diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-09-07 14:12:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-07 14:12:35 +0200 |
commit | 3bd6b2a0b30e1ff7805ce8c86671e63e4ab18187 (patch) | |
tree | 4c0caad4279129eab357c1ef732b99ca6530722d | |
parent | 11c7a98a2a6ac0fc78a85d8842946d5bdd87f215 (diff) | |
parent | 5a257cec634fd04a628ef1cfba6fe0ee6a14216c (diff) | |
download | nextcloud-server-3bd6b2a0b30e1ff7805ce8c86671e63e4ab18187.tar.gz nextcloud-server-3bd6b2a0b30e1ff7805ce8c86671e63e4ab18187.zip |
Merge pull request #6379 from nextcloud/ensure-password-complexity
Make sure the password contains special characters
-rw-r--r-- | settings/Controller/UsersController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php index cb191441c9a..a78c1b9466b 100644 --- a/settings/Controller/UsersController.php +++ b/settings/Controller/UsersController.php @@ -437,7 +437,9 @@ class UsersController extends Controller { ); } - $password = $this->secureRandom->generate(32); + $password = $this->secureRandom->generate(30); + // Make sure we pass the password_policy + $password .= $this->secureRandom->generate(2, '$!.,;:-~+*[]{}()'); $generatePasswordResetToken = true; } |