From 4d9d5d39666addc2afbb61bb04b00dc1ed707ecc Mon Sep 17 00:00:00 2001 From: eliott Date: Sun, 17 Feb 2008 20:37:49 -0800 Subject: Fix for information leak in login logic. Fix for information leak in login logic. No point telling people they have a valid username when the pass is wrong, etc. --- web/lib/aur.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'web/lib') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 234dca98..e7e8c494 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -356,13 +356,11 @@ function html_header($title="") { $q.= "AND Passwd = '" . mysql_real_escape_string($_POST["pass"]) . "'"; $result = db_query($q, $dbh); if (!$result) { - $login_error = __("Error looking up username, %s.", - array(htmlspecialchars($_POST["user"]))); + $login_error = __("Login failure: Bad user or pass."); } else { $row = mysql_fetch_row($result); if (empty($row)) { - $login_error = __("Incorrect password for username, %s.", - array(htmlspecialchars($_POST["user"]))); + $login_error = __("Login failure: Bad user or pass."); } elseif ($row[1]) { $login_error = __("Your account has been suspended."); } -- cgit v1.2.3-24-g4f1b