Skip to content

Commit

Permalink
Fixed issue #18542: Plugins: PasswordRequirement plugin is not workin…
Browse files Browse the repository at this point in the history
…g properly (#2847)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
  • Loading branch information
gabrieljenik and lapiudevgit committed Feb 8, 2023
1 parent a0a3fe6 commit d5bc7d2
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -154,7 +154,7 @@ public function validateSaveSurveyForm()
private function checkValidityOfPassword($password, $needsNumber, $needsUppercase, $needsNonAlphanumeric, $minimumSize = 8)
{
$errors = [];
if ($needsNumber && ctype_alpha($password)) {
if ($needsNumber && preg_match('/\d/', $password) === 0) {
$errors[] = gT('The password does require at least one digit');
}
if ($needsUppercase && strtolower($password) == $password) {
Expand Down

0 comments on commit d5bc7d2

Please sign in to comment.