From: Simon Green Date: Wed, 7 Aug 2013 05:16:56 +0000 (+1000) Subject: Bug 897264 - letters_numbers_specialchars password restriction is incorrect X-Git-Tag: bugzilla-4.4.1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d455b10dd5b9841b88a06bd59face7345cc15534;p=thirdparty%2Fbugzilla.git Bug 897264 - letters_numbers_specialchars password restriction is incorrect r=LpSolit, a=sgreen --- diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index c787e0332d..aa94e44a1d 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -2096,7 +2096,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 30ca3e86b6..378323fd5b 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -1381,21 +1381,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: - + [% title = "Password Fails Requirements" %] + [% passregex = Param('password_complexity') %] + The password must contain at least one: + [% ELSIF error == "product_access_denied" %] [% title = "Product Access Denied" %]