summaryrefslogtreecommitdiffstats
path: root/token.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'token.cgi')
-rwxr-xr-xtoken.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/token.cgi b/token.cgi
index d8c3fe288..64bf8e364 100755
--- a/token.cgi
+++ b/token.cgi
@@ -36,6 +36,7 @@ use Bugzilla::Constants;
use Bugzilla::Auth;
my $cgi = Bugzilla->cgi;
+my $dbh = Bugzilla->dbh;
# Include the Bugzilla CGI and general utility library.
require "CGI.pl";
@@ -114,7 +115,8 @@ if ( $::action eq 'reqpw' ) {
CheckEmailSyntax($cgi->param('loginname'));
my $quotedloginname = SqlQuote($cgi->param('loginname'));
- SendSQL("SELECT userid FROM profiles WHERE login_name = $quotedloginname");
+ SendSQL("SELECT userid FROM profiles WHERE " .
+ $dbh->sql_istrcmp('login_name', $quotedloginname));
FetchSQLData()
|| ThrowUserError("account_inexistent");
}