summaryrefslogtreecommitdiffstats
path: root/token.cgi
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-07-21 07:41:18 +0200
committerbugreport%peshkin.net <>2004-07-21 07:41:18 +0200
commit7bdd1cbe564883cd12abee3657e671e97e85a8e5 (patch)
tree06dd7387c408735c32fa425489ace9a50115dd5d /token.cgi
parent899f61d64550dfd9452972cea600505cc8c7d4e3 (diff)
downloadbugzilla-7bdd1cbe564883cd12abee3657e671e97e85a8e5.tar.gz
bugzilla-7bdd1cbe564883cd12abee3657e671e97e85a8e5.tar.xz
Bug 241900: Allow Bugzilla::Auth to have multiple login and validation styles
patch by erik r=joel, kiko a=myk
Diffstat (limited to 'token.cgi')
-rwxr-xr-xtoken.cgi9
1 files changed, 8 insertions, 1 deletions
diff --git a/token.cgi b/token.cgi
index 36508f0a5..03d0e8b03 100755
--- a/token.cgi
+++ b/token.cgi
@@ -95,12 +95,19 @@ if ($cgi->param('t')) {
}
}
+
# If the user is requesting a password change, make sure they submitted
-# their login name and it exists in the database.
+# their login name and it exists in the database, and that the DB module is in
+# the list of allowed verification methids.
if ( $::action eq 'reqpw' ) {
defined $cgi->param('loginname')
|| ThrowUserError("login_needed_for_password_change");
+ # check verification methods
+ unless (Bugzilla::Auth->has_db) {
+ ThrowUserError("password_change_requests_not_allowed");
+ }
+
# Make sure the login name looks like an email address. This function
# displays its own error and stops execution if the login name looks wrong.
CheckEmailSyntax($cgi->param('loginname'));