]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 455814: token.cgi should reject password change requests for disabled accounts...
authorlpsolit%gmail.com <>
Sat, 20 Sep 2008 01:00:25 +0000 (01:00 +0000)
committerlpsolit%gmail.com <>
Sat, 20 Sep 2008 01:00:25 +0000 (01:00 +0000)
template/en/default/global/messages.html.tmpl
token.cgi

index d35cd6d6dfeec415c8960c7afc2bb32ff7e2eaea..eb869a77637006a1331e99ba99ca5492007cb8e1 100644 (file)
     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.
index bbbbe01c6eed9f31b430a203f680fc1592df1c9e..34a0173760625229f9649191a439b6c99da6008b 100755 (executable)
--- 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