summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-09-06 15:48:45 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-09-07 12:47:55 +0200
commit5a257cec634fd04a628ef1cfba6fe0ee6a14216c (patch)
treeeab050860281f93ddccb07a87b46128146c901ad /settings
parentc58853d22374edbf4b3f3c477d3aeb960c3cbe72 (diff)
downloadnextcloud-server-5a257cec634fd04a628ef1cfba6fe0ee6a14216c.tar.gz
nextcloud-server-5a257cec634fd04a628ef1cfba6fe0ee6a14216c.zip
Make sure the password contains special characters
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings')
-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;
}