aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-10-11 13:32:51 +0200
committerGitHub <noreply@github.com>2022-10-11 13:32:51 +0200
commit719c9c3655068f55bab92f106f06d6d8760df5da (patch)
tree50442d15dba4d57f078c7499f4108ed6e644f1b5 /apps
parente4d3344076957f40b3cdbab779c3d54fd4c17377 (diff)
parenta5765136e8f4319b5c9f45c2906b5ae338272a49 (diff)
downloadnextcloud-server-719c9c3655068f55bab92f106f06d6d8760df5da.tar.gz
nextcloud-server-719c9c3655068f55bab92f106f06d6d8760df5da.zip
Merge pull request #34500 from nextcloud/bugfix/noid/more-password-limitation
Fix password length limitation
Diffstat (limited to 'apps')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php6
-rw-r--r--apps/settings/src/components/UserList.vue1
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index e8b6fd0e8d9..0f9ffcbadf4 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -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);
}
diff --git a/apps/settings/src/components/UserList.vue b/apps/settings/src/components/UserList.vue
index 8b2a84a9b9a..9d737206bf4 100644
--- a/apps/settings/src/components/UserList.vue
+++ b/apps/settings/src/components/UserList.vue
@@ -56,6 +56,7 @@
ref="newuserpassword"
v-model="newUser.password"
:minlength="minPasswordLength"
+ :maxlength="469"
:placeholder="t('settings', 'Password')"
:required="newUser.mailAddress===''"
autocapitalize="none"