mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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.
This commit is contained in:
parent
aedf2ab6a3
commit
4d9d5d3966
2 changed files with 5 additions and 8 deletions
|
@ -35,16 +35,12 @@ $_t["en"]["For now, it's just a place holder."] = "For now, it's just a place ho
|
||||||
|
|
||||||
$_t["en"]["It's more important to get the login functionality finished."] = "It's more important to get the login functionality finished.";
|
$_t["en"]["It's more important to get the login functionality finished."] = "It's more important to get the login functionality finished.";
|
||||||
|
|
||||||
$_t["en"]["Error looking up username, %s."] = "Error looking up username, %s.";
|
|
||||||
|
|
||||||
$_t["en"]["Login"] = "Login";
|
$_t["en"]["Login"] = "Login";
|
||||||
|
|
||||||
$_t["en"]["Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience."] = "Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience.";
|
$_t["en"]["Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience."] = "Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience.";
|
||||||
|
|
||||||
$_t["en"]["If you have feedback about the AUR, please leave it in %hFlyspray%h."] = "If you have feedback about the AUR, please leave it in %hFlyspray%h.";
|
$_t["en"]["If you have feedback about the AUR, please leave it in %hFlyspray%h."] = "If you have feedback about the AUR, please leave it in %hFlyspray%h.";
|
||||||
|
|
||||||
$_t["en"]["Incorrect password for username, %s."] = "Incorrect password for username, %s.";
|
|
||||||
|
|
||||||
$_t["en"]["Latest Packages:"] = "Latest Packages:";
|
$_t["en"]["Latest Packages:"] = "Latest Packages:";
|
||||||
|
|
||||||
$_t["en"]["Discussion about the AUR takes place on the %sTUR Users List%s."] = "Discussion about the AUR takes place on the %sTUR Users List%s.";
|
$_t["en"]["Discussion about the AUR takes place on the %sTUR Users List%s."] = "Discussion about the AUR takes place on the %sTUR Users List%s.";
|
||||||
|
@ -94,6 +90,9 @@ $_t["en"]["The most popular packages will be provided as binary packages in [com
|
||||||
$_t["en"]["Packages added or updated in the past 7 days"] = "Packages added or updated in the past 7 days";
|
$_t["en"]["Packages added or updated in the past 7 days"] = "Packages added or updated in the past 7 days";
|
||||||
|
|
||||||
$_t["en"]["Out-of-date"] = "Out-of-date";
|
$_t["en"]["Out-of-date"] = "Out-of-date";
|
||||||
|
|
||||||
$_t["en"]["DISCLAIMER"] = "DISCLAIMER: Unsupported PKGBUILDs are user produced content, by downloading them you agree to do so at your own risk.";
|
$_t["en"]["DISCLAIMER"] = "DISCLAIMER: Unsupported PKGBUILDs are user produced content, by downloading them you agree to do so at your own risk.";
|
||||||
|
|
||||||
|
$_t["en"]["Login failure: Bad user or pass."] = "Login failure: Bad user or pass.";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -356,13 +356,11 @@ function html_header($title="") {
|
||||||
$q.= "AND Passwd = '" . mysql_real_escape_string($_POST["pass"]) . "'";
|
$q.= "AND Passwd = '" . mysql_real_escape_string($_POST["pass"]) . "'";
|
||||||
$result = db_query($q, $dbh);
|
$result = db_query($q, $dbh);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$login_error = __("Error looking up username, %s.",
|
$login_error = __("Login failure: Bad user or pass.");
|
||||||
array(htmlspecialchars($_POST["user"])));
|
|
||||||
} else {
|
} else {
|
||||||
$row = mysql_fetch_row($result);
|
$row = mysql_fetch_row($result);
|
||||||
if (empty($row)) {
|
if (empty($row)) {
|
||||||
$login_error = __("Incorrect password for username, %s.",
|
$login_error = __("Login failure: Bad user or pass.");
|
||||||
array(htmlspecialchars($_POST["user"])));
|
|
||||||
} elseif ($row[1]) {
|
} elseif ($row[1]) {
|
||||||
$login_error = __("Your account has been suspended.");
|
$login_error = __("Your account has been suspended.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue