From b4a29644ccfc1acafcfbdb8b7b887df1fe520166 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 4 Jan 2023 11:23:43 +0100 Subject: Add a const for the max user password length Signed-off-by: Joas Schilling --- apps/provisioning_api/lib/Controller/UsersController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/provisioning_api') diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 434912f32aa..97d66acd2e0 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -389,7 +389,7 @@ class UsersController extends AUserData { } $generatePasswordResetToken = false; - if (strlen($password) > 469) { + if (strlen($password) > IUserManager::MAX_PASSWORD_LENGTH) { throw new OCSException('Invalid password value', 101); } if ($password === '') { @@ -889,7 +889,7 @@ class UsersController extends AUserData { break; case self::USER_FIELD_PASSWORD: try { - if (strlen($value) > 469) { + if (strlen($value) > IUserManager::MAX_PASSWORD_LENGTH) { throw new OCSException('Invalid password value', 102); } if (!$targetUser->canChangePassword()) { -- cgit v1.2.3