summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-01 16:24:34 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-03-04 10:29:13 +0100
commit984ce9529c926c884136780d017ae90f0b82b54b (patch)
tree1c8019f8153798848c279f9e1e660b83ed6c8de2 /web/html
parent90485e8f422cec6d23af38574a53705fa7de008b (diff)
downloadaur-984ce9529c926c884136780d017ae90f0b82b54b.tar.gz
aur-984ce9529c926c884136780d017ae90f0b82b54b.tar.xz
Improve cookie handling
* Remove comment that is mostly bogus- the domain is automatically set. * When logging out, don't delete the language cookie. * Make the language cookie persistent. * Use the minimal time possible to expire cookies; no need to compute anything. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/logout.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/html/logout.php b/web/html/logout.php
index 14c652e2..95cf4600 100644
--- a/web/html/logout.php
+++ b/web/html/logout.php
@@ -14,8 +14,9 @@ if (isset($_COOKIE["AURSID"])) {
$q = "DELETE FROM Sessions WHERE SessionID = '";
$q.= mysql_real_escape_string($_COOKIE["AURSID"]) . "'";
db_query($q, $dbh);
- setcookie("AURSID", "", time() - (60*60*24*30), "/");
- setcookie("AURLANG", "", time() - (60*60*24*30), "/");
+ # setting expiration to 1 means '1 second after midnight January 1, 1970'
+ setcookie("AURSID", "", 1, "/");
+ unset($_COOKIE['AURSID']);
}
clear_expired_sessions();