Commit dd6720f4 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 471620: USER_PASSWORD_MAX_LENGTH is no longer needed - Patch by Fré©ric…

Bug 471620: USER_PASSWORD_MAX_LENGTH is no longer needed - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=dkl a=LpSolit
parent caab33ef
......@@ -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;
......
......@@ -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');
}
......
......@@ -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."
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment