summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-09-20 03:00:25 +0200
committerlpsolit%gmail.com <>2008-09-20 03:00:25 +0200
commitbea6f25db1bf8f4333b3bf72d73015c7cdb9a197 (patch)
tree379228d8bbaea08dde2719bd1f44aa9f3db4e62b
parent7499f716a31d86e87e62705bb479567f8df08d72 (diff)
downloadbugzilla-bea6f25db1bf8f4333b3bf72d73015c7cdb9a197.tar.gz
bugzilla-bea6f25db1bf8f4333b3bf72d73015c7cdb9a197.tar.xz
Bug 455814: token.cgi should reject password change requests for disabled accounts - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
-rw-r--r--template/en/default/global/messages.html.tmpl4
-rwxr-xr-xtoken.cgi6
2 files changed, 10 insertions, 0 deletions
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl
index d35cd6d6d..eb869a776 100644
--- a/template/en/default/global/messages.html.tmpl
+++ b/template/en/default/global/messages.html.tmpl
@@ -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.
diff --git a/token.cgi b/token.cgi
index bbbbe01c6..34a017376 100755
--- a/token.cgi
+++ b/token.cgi
@@ -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