From 81cd33466457a31e7694e503e32ff2cc90dce047 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 18 Jan 2023 20:27:29 -0500 Subject: [PATCH] Fix wrong logic in password allowed regular expression --- src/Model/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/User.php b/src/Model/User.php index bd7351f072..35ea835b30 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -776,7 +776,7 @@ class User $allowed_characters = preg_quote($allowed_characters, $delimiter); } - return '^[a-zA-Z0-9' . $allowed_characters . ']' . (PASSWORD_DEFAULT !== PASSWORD_BCRYPT ? '{1,72}' : '+') . '$'; + return '^[a-zA-Z0-9' . $allowed_characters . ']' . (PASSWORD_DEFAULT === PASSWORD_BCRYPT ? '{1,72}' : '+') . '$'; } /** -- 2.39.5