summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php4
-rw-r--r--apps/settings/lib/Controller/ChangePasswordController.php4
2 files changed, 4 insertions, 4 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()) {
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' => [