my ($login) = (@_);
SendSQL("select cryptpassword from profiles where login_name = " .
SqlQuote($login));
- return FetchOneColumn();
+ my $result = FetchOneColumn();
+ if (!defined $result) {
+ $result = "";
+ }
+ return $result;
}
sub confirm_login {
exit;
}
my $realcryptpwd = PasswordForLogin($::FORM{"Bugzilla_login"});
- my $enteredcryptpwd = crypt($enteredpwd, substr($realcryptpwd, 0, 2));
if (defined $::FORM{"PleaseMailAPassword"}) {
my $realpwd;
SqlQuote($enteredlogin));
$realpwd = FetchOneColumn();
}
+ my $urlbase = Param("urlbase");
my $template = "From: bugzilla-daemon
To: %s
Subject: Your bugzilla password.
Password: %s
To change your password, go to:
- [Param urlbase]changepassword.cgi
+ ${urlbase}changepassword.cgi
(Your bugzilla and CVS password, if any, are not currently synchronized.
Top hackers are working around the clock to fix this, as you read this.)
print "and enter your password in the form there.\n";
exit;
}
-
+
+ my $enteredcryptpwd = crypt($enteredpwd, substr($realcryptpwd, 0, 2));
if ($realcryptpwd eq "" || $enteredcryptpwd ne $realcryptpwd) {
print "Content-type: text/html\n\n";
print "<H1>Login failed.</H1>\n";