From 5a257cec634fd04a628ef1cfba6fe0ee6a14216c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 6 Sep 2017 15:48:45 +0200 Subject: [PATCH] Make sure the password contains special characters Signed-off-by: Joas Schilling --- settings/Controller/UsersController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php index cb191441c9..a78c1b9466 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; }