From 0c8cd681e39278f601d4c0c6ceaadb3a8bc155ff Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Tue, 25 May 1999 02:42:28 +0000 Subject: Make sure login name is in canonical form. --- CGI.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CGI.pl') diff --git a/CGI.pl b/CGI.pl index 595c8ab32..68bb7edca 100644 --- a/CGI.pl +++ b/CGI.pl @@ -282,7 +282,8 @@ sub quietly_check_login() { if (defined $::COOKIE{"Bugzilla_login"} && defined $::COOKIE{"Bugzilla_logincookie"}) { ConnectToDatabase(); - SendSQL("select profiles.groupset, profiles.login_name = " . + SendSQL("select profiles.groupset, profiles.login_name, " . + "profiles.login_name = " . SqlQuote($::COOKIE{"Bugzilla_login"}) . " and profiles.cryptpassword = logincookies.cryptpassword " . "and logincookies.hostname = " . @@ -292,9 +293,11 @@ sub quietly_check_login() { " and profiles.userid = logincookies.userid"); my @row; if (@row = FetchSQLData()) { - $loginok = $row[1]; + $loginok = $row[2]; if ($loginok) { $::usergroupset = $row[0]; + $::COOKIE{"Bugzilla_login"} = $row[1]; # Makes sure case is in + # canonical form. } } } -- cgit v1.2.3-24-g4f1b