summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-01-04 11:23:43 +0100
committerJoas Schilling <coding@schilljs.com>2023-01-04 11:23:43 +0100
commitb4a29644ccfc1acafcfbdb8b7b887df1fe520166 (patch)
tree4725bc96a608f2430c267145232c5b9a42ab835e /apps/settings
parentce50acd9b2d7acb3f04fd7c7940e821cb3d76a71 (diff)
downloadnextcloud-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/settings')
-rw-r--r--apps/settings/lib/Controller/ChangePasswordController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/settings/lib/Controller/ChangePasswordController.php b/apps/settings/lib/Controller/ChangePasswordController.php
index a25f0b0e59b..20ec28220a5 100644
--- a/apps/settings/lib/Controller/ChangePasswordController.php
+++ b/apps/settings/lib/Controller/ChangePasswordController.php
@@ -95,7 +95,7 @@ class ChangePasswordController extends Controller {
}
try {
- if ($newpassword === null || strlen($newpassword) > 469 || $user->setPassword($newpassword) === false) {
+ if ($newpassword === null || strlen($newpassword) > IUserManager::MAX_PASSWORD_LENGTH || $user->setPassword($newpassword) === false) {
return new JSONResponse([
'status' => 'error',
'data' => [
@@ -146,7 +146,7 @@ class ChangePasswordController extends Controller {
]);
}
- if (strlen($password) > 469) {
+ if (strlen($password) > IUserManager::MAX_PASSWORD_LENGTH) {
return new JSONResponse([
'status' => 'error',
'data' => [