mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fix bug with botched AURSID values
In the check_sid function in aur.inc the condition for expiring the cookie and redirecting to hacker.php could never be met and instead the user would be given blank login instead of being considered logged out, now fixed. This also means we no longer need either hacker.php or timeout.php at all. Also, this bug seems to be present in the AUR version running on aur.archlinux.org. Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
This commit is contained in:
parent
0e4b25211b
commit
bf5c28cf22
2 changed files with 7 additions and 9 deletions
|
@ -68,7 +68,10 @@ foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
|
|||
<br />
|
||||
<div style="text-align: right; padding-right: 10px">
|
||||
<?php
|
||||
if (!isset($_COOKIE["AURSID"])) {
|
||||
if (isset($_COOKIE["AURSID"])) {
|
||||
print __("Logged-in as: %h%s%h",
|
||||
array("<b>", username_from_sid($_COOKIE["AURSID"]), "</b>"));
|
||||
} else {
|
||||
if ($login_error) {
|
||||
print "<span class='error'>" . $login_error . "</span><br />\n";
|
||||
}
|
||||
|
@ -81,9 +84,6 @@ if (!isset($_COOKIE["AURSID"])) {
|
|||
<input type='submit' class='button' value='<?php print __("Login"); ?>'>
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
print __("Logged-in as: %h%s%h",
|
||||
array("<b>", username_from_sid($_COOKIE["AURSID"]), "</b>"));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue