From 2322f835d1f43ad8f709d784bfcf140710ae2bae Mon Sep 17 00:00:00 2001 From: Simon Green Date: Fri, 9 Aug 2013 13:57:38 +1000 Subject: [PATCH] Bug 897264 - letters_numbers_specialchars password restriction is incorrect r=LpSolit, a=sgreen --- Bugzilla/User.pm | 2 +- .../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 878daea608..0bc49d9b14 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -2070,7 +2070,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 2341cd58fc..8de412413c 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -1334,21 +1334,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" %] -- 2.47.2