summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-09-07 14:12:35 +0200
committerGitHub <noreply@github.com>2017-09-07 14:12:35 +0200
commit3bd6b2a0b30e1ff7805ce8c86671e63e4ab18187 (patch)
tree4c0caad4279129eab357c1ef732b99ca6530722d
parent11c7a98a2a6ac0fc78a85d8842946d5bdd87f215 (diff)
parent5a257cec634fd04a628ef1cfba6fe0ee6a14216c (diff)
downloadnextcloud-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.php4
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;
}