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

Bug 287741: changing password from 'password' to 'password' should not…

Bug 287741: changing password from 'password' to 'password' should not invalidate login cookies - Patch by Marc Schumann <wurblzap@gmail.com> r=LpSolit a=justdave
parent 77788555
...@@ -97,16 +97,18 @@ sub SaveAccount { ...@@ -97,16 +97,18 @@ sub SaveAccount {
$cgi->param('new_password1') $cgi->param('new_password1')
|| ThrowUserError("new_password_missing"); || ThrowUserError("new_password_missing");
ValidatePassword($pwd1, $pwd2); ValidatePassword($pwd1, $pwd2);
my $cryptedpassword = bz_crypt($pwd1); if ($cgi->param('Bugzilla_password') ne $pwd1) {
trick_taint($cryptedpassword); # Only used in a placeholder my $cryptedpassword = bz_crypt($pwd1);
$dbh->do(q{UPDATE profiles trick_taint($cryptedpassword); # Only used in a placeholder
SET cryptpassword = ? $dbh->do(q{UPDATE profiles
WHERE userid = ?}, SET cryptpassword = ?
undef, ($cryptedpassword, $user->id)); WHERE userid = ?},
undef, ($cryptedpassword, $user->id));
# Invalidate all logins except for the current one
Bugzilla->logout(LOGOUT_KEEP_CURRENT); # Invalidate all logins except for the current one
Bugzilla->logout(LOGOUT_KEEP_CURRENT);
}
} }
} }
......
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