Fixing minor problem caused by the original bug 77473 checkin where an SQL error was being produced if you tried to log in

with an invalid username.
Patch by Myk Melez <myk@mozilla.org>
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@99326 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
justdave%syndicomm.com 2001-07-16 19:38:34 +00:00
parent 2ca7d9b2aa
commit b578f52ce7

View File

@ -727,6 +727,12 @@ sub confirm_login {
WHERE login_name = " . SqlQuote($enteredlogin));
($userid, $realcryptpwd) = FetchSQLData();
# Make sure the user exists or throw an error (but do not admit it was a username
# error to make it harder for a cracker to find account names by brute force).
$userid
|| DisplayError("The username or password you entered is not valid.")
&& exit;
# If this is a new user, generate a password, insert a record
# into the database, and email their password to them.
if ( defined $::FORM{"PleaseMailAPassword"} && !$userid ) {