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

Bug 455814: token.cgi should reject password change requests for disabled…

Bug 455814: token.cgi should reject password change requests for disabled accounts - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
parent 7499f716
......@@ -114,6 +114,10 @@
The user account [% otheruser.login FILTER html %] has been deleted
successfully.
[% ELSIF message_tag == "account_disabled" %]
The user account [% account FILTER html %] is disabled, so you
cannot change its password.
[% ELSIF message_tag == "attachment_creation_failed" %]
The [% terms.bug %] was created successfully, but attachment creation
failed.
......
......@@ -111,6 +111,12 @@ if ( $action eq 'reqpw' ) {
|| ThrowUserError('illegal_email_address', {addr => $login_name});
$user_account = Bugzilla::User->check($login_name);
# Make sure the user account is active.
if ($user_account->is_disabled) {
ThrowUserError('account_disabled',
{disabled_reason => get_text('account_disabled', {account => $login_name})});
}
}
# If the user is changing their password, make sure they submitted a new
......
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