summaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-01-05 06:31:32 +0100
committerGitHub <noreply@github.com>2023-01-05 06:31:32 +0100
commit4670c5b38fe43edf3d4be090e693dd3c22a6aebb (patch)
tree3fa28e564fb10573f4af3e58037f3d4e08eb4be6 /apps/settings
parent411754a12a5ac6ab244688e4910987af9f0287cd (diff)
parentb4a29644ccfc1acafcfbdb8b7b887df1fe520166 (diff)
downloadnextcloud-server-4670c5b38fe43edf3d4be090e693dd3c22a6aebb.tar.gz
nextcloud-server-4670c5b38fe43edf3d4be090e693dd3c22a6aebb.zip
Merge pull request #35981 from nextcloud/followup/35965/const-for-max-password-length
Add a const for the max user password length
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' => [