diff options
author | Joas Schilling <coding@schilljs.com> | 2023-01-04 11:23:43 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-01-04 11:23:43 +0100 |
commit | b4a29644ccfc1acafcfbdb8b7b887df1fe520166 (patch) | |
tree | 4725bc96a608f2430c267145232c5b9a42ab835e /apps/provisioning_api | |
parent | ce50acd9b2d7acb3f04fd7c7940e821cb3d76a71 (diff) | |
download | nextcloud-server-b4a29644ccfc1acafcfbdb8b7b887df1fe520166.tar.gz nextcloud-server-b4a29644ccfc1acafcfbdb8b7b887df1fe520166.zip |
Add a const for the max user password length
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 4 |
1 files changed, 2 insertions, 2 deletions
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()) { |