mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Use secure and httponly session cookies
As discussed on the mailing list, enable "secure" and "httponly" for session cookies to prevent them from being transferred over insecure connections. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
1c9db1d1f1
commit
00e4e0294f
3 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ if (isset($_COOKIE["AURSID"])) {
|
|||
$q.= mysql_real_escape_string($_COOKIE["AURSID"]) . "'";
|
||||
db_query($q, $dbh);
|
||||
# setting expiration to 1 means '1 second after midnight January 1, 1970'
|
||||
setcookie("AURSID", "", 1, "/");
|
||||
setcookie("AURSID", "", 1, "/", null, !empty($_SERVER['HTTPS']), true);
|
||||
unset($_COOKIE['AURSID']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue