summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-01-18 23:40:18 +0100
committerterry%mozilla.org <>2000-01-18 23:40:18 +0100
commitca8760339069c50ccbdcf3d92e416f7d1522adf8 (patch)
treee2386af360bc276ba659635b80075da04dd24ed4 /CGI.pl
parente908456f366483dcc915bafc7036733310ebc6e5 (diff)
downloadbugzilla-ca8760339069c50ccbdcf3d92e416f7d1522adf8.tar.gz
bugzilla-ca8760339069c50ccbdcf3d92e416f7d1522adf8.tar.xz
Stop ever using perl's crypt() function; only use mysql's. (Using
both was causing corruption on about 1 in 40 passwords.)
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/CGI.pl b/CGI.pl
index 41667dd2c..5f7a21f88 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -604,7 +604,10 @@ sub confirm_login {
exit;
}
- my $enteredcryptpwd = crypt($enteredpwd, substr($realcryptpwd, 0, 2));
+ SendSQL("SELECT encrypt(" . SqlQuote($enteredpwd) . ", " .
+ SqlQuote(substr($realcryptpwd, 0, 2)) . ")");
+ my $enteredcryptpwd = FetchOneColumn();
+
if ($realcryptpwd eq "" || $enteredcryptpwd ne $realcryptpwd) {
print "Content-type: text/html\n\n";
PutHeader("Login failed");