diff options
-rw-r--r-- | Bugzilla/User.pm | 2 | ||||
-rw-r--r-- | template/en/default/global/user-error.html.tmpl | 30 |
2 files changed, 16 insertions, 16 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 943ec7247..c6cd23840 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -2116,7 +2116,7 @@ sub validate_password { my $complexity_level = Bugzilla->params->{password_complexity}; if ($complexity_level eq 'letters_numbers_specialchars') { ThrowUserError('password_not_complex') - if ($password !~ /\w/ || $password !~ /\d/ || $password !~ /[[:punct:]]/); + if ($password !~ /[[:alpha:]]/ || $password !~ /\d/ || $password !~ /[[:punct:]]/); } elsif ($complexity_level eq 'letters_numbers') { ThrowUserError('password_not_complex') if ($password !~ /[[:lower:]]/ || $password !~ /[[:upper:]]/ || $password !~ /\d/); diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 65fb4f18a..038704c34 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -1395,21 +1395,21 @@ [%+ constants.USER_PASSWORD_MIN_LENGTH FILTER html %] characters long. [% ELSIF error == "password_not_complex" %] - [% title = "Password Fails Requirements" %] - [% passregex = Param('password_complexity') %] - The password must contain at least one: - <ul> - [% IF passregex.search('letters') %] - <li>UPPERCASE letter</li> - <li>lowercase letter</li> - [% END %] - [% IF passregex.search('numbers') %] - <li>digit</li> - [% END %] - [% IF passregex.search('specialchars') %] - <li>special character</li> - [% END %] - </ul> + [% title = "Password Fails Requirements" %] + [% passregex = Param('password_complexity') %] + The password must contain at least one: + <ul> + [% IF passregex == 'letters_numbers_specialchars' %] + <li>letter</li> + <li>special character</li> + [% ELSIF passregex.search('letters') %] + <li>UPPERCASE letter</li> + <li>lowercase letter</li> + [% END %] + [% IF passregex.search('numbers') %] + <li>digit</li> + [% END %] + </ul> [% ELSIF error == "product_access_denied" %] [% title = "Product Access Denied" %] |