mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Patch for bug 123077; improve the ValidatePassword sub so that a password change is no longer accepted with a blank second field; r=kiko, a=justdave.
This commit is contained in:
parent
f692e33830
commit
fa9ce070ba
@ -706,7 +706,7 @@ sub ValidatePassword {
|
||||
ThrowUserError("password_too_short");
|
||||
} elsif (length($password) > 16) {
|
||||
ThrowUserError("password_too_long");
|
||||
} elsif ($matchpassword && $password ne $matchpassword) {
|
||||
} elsif ((defined $matchpassword) && ($password ne $matchpassword)) {
|
||||
ThrowUserError("passwords_dont_match");
|
||||
}
|
||||
}
|
||||
|
@ -97,9 +97,8 @@ sub SaveAccount {
|
||||
|
||||
if ($pwd1 ne "" || $pwd2 ne "")
|
||||
{
|
||||
($pwd1 eq $pwd2) || ThrowUserError("passwords_dont_match");
|
||||
$::FORM{'new_password1'} || ThrowUserError("new_password_missing");
|
||||
ValidatePassword($pwd1);
|
||||
ValidatePassword($pwd1, $pwd2);
|
||||
|
||||
my $cryptedpassword = SqlQuote(Crypt($pwd1));
|
||||
SendSQL("UPDATE profiles
|
||||
|
Loading…
Reference in New Issue
Block a user