mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #34531 from nextcloud/backport/34500/stable25
[stable25] Fix password length limitation
This commit is contained in:
commit
ce7bfc6b33
6 changed files with 13 additions and 6 deletions
|
|
@ -389,6 +389,9 @@ class UsersController extends AUserData {
|
|||
}
|
||||
|
||||
$generatePasswordResetToken = false;
|
||||
if (strlen($password) > 469) {
|
||||
throw new OCSException('Invalid password value', 101);
|
||||
}
|
||||
if ($password === '') {
|
||||
if ($email === '') {
|
||||
throw new OCSException('To send a password link to the user an email address is required.', 108);
|
||||
|
|
@ -882,6 +885,9 @@ class UsersController extends AUserData {
|
|||
break;
|
||||
case self::USER_FIELD_PASSWORD:
|
||||
try {
|
||||
if (strlen($value) > 469) {
|
||||
throw new OCSException('Invalid password value', 102);
|
||||
}
|
||||
if (!$targetUser->canChangePassword()) {
|
||||
throw new OCSException('Setting the password is not supported by the users backend', 103);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
ref="newuserpassword"
|
||||
v-model="newUser.password"
|
||||
:minlength="minPasswordLength"
|
||||
:maxlength="469"
|
||||
:placeholder="t('settings', 'Password')"
|
||||
:required="newUser.mailAddress===''"
|
||||
autocapitalize="none"
|
||||
|
|
|
|||
4
dist/settings-users-8351.js
vendored
4
dist/settings-users-8351.js
vendored
File diff suppressed because one or more lines are too long
2
dist/settings-users-8351.js.map
vendored
2
dist/settings-users-8351.js.map
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue