From: lpsolit%gmail.com <> Date: Sun, 9 Aug 2009 19:51:43 +0000 (+0000) Subject: Bug 471620: USER_PASSWORD_MAX_LENGTH is no longer needed - Patch by Frédéric Buclin... X-Git-Tag: bugzilla-3.5.1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd6720f4af864e29e49d26befe1ec1b04a92a71c;p=thirdparty%2Fbugzilla.git Bug 471620: USER_PASSWORD_MAX_LENGTH is no longer needed - Patch by Frédéric Buclin r=dkl a=LpSolit --- diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 294d034916..ef3853788c 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -57,7 +57,6 @@ use File::Basename; AUTH_NO_SUCH_USER USER_PASSWORD_MIN_LENGTH - USER_PASSWORD_MAX_LENGTH LOGIN_OPTIONAL LOGIN_NORMAL @@ -226,9 +225,8 @@ use constant AUTH_LOGINFAILED => 3; use constant AUTH_DISABLED => 4; use constant AUTH_NO_SUCH_USER => 5; -# The minimum and maximum lengths a password must have. +# The minimum length a password must have. use constant USER_PASSWORD_MIN_LENGTH => 3; -use constant USER_PASSWORD_MAX_LENGTH => 16; use constant LOGIN_OPTIONAL => 0; use constant LOGIN_NORMAL => 1; diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 0eb47b8b3e..ff486684b0 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1706,8 +1706,6 @@ sub validate_password { if (length($password) < USER_PASSWORD_MIN_LENGTH) { ThrowUserError('password_too_short'); - } elsif (length($password) > USER_PASSWORD_MAX_LENGTH) { - ThrowUserError('password_too_long'); } elsif ((defined $matchpassword) && ($password ne $matchpassword)) { ThrowUserError('passwords_dont_match'); } diff --git a/Bugzilla/WebService/Constants.pm b/Bugzilla/WebService/Constants.pm index 260ae9478b..8e7465a5a0 100644 --- a/Bugzilla/WebService/Constants.pm +++ b/Bugzilla/WebService/Constants.pm @@ -103,7 +103,6 @@ use constant WS_ERROR_CODE => { account_creation_disabled => 501, account_creation_restricted => 501, password_too_short => 502, - password_too_long => 503, invalid_username => 504, # This is from strict_isolation, but it also basically means # "invalid user." diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index a30f297066..58cf4e01d3 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -1276,11 +1276,6 @@ [% title = "Passwords Don't Match" %] The two passwords you entered did not match. - [% ELSIF error == "password_too_long" %] - [% title = "Password Too Long" %] - The password must be no more than - [%+ constants.USER_PASSWORD_MAX_LENGTH FILTER html %] characters long. - [% ELSIF error == "password_too_short" %] [% title = "Password Too Short" %] The password must be at least