From d8c05e82b1a7ca79a4c9b0fe52ebe06b2b7a9cfb Mon Sep 17 00:00:00 2001 From: Timothy Allen Date: Fri, 25 Sep 2026 21:42:56 +0200 Subject: [PATCH] Make the session cookie last until the browser closes. The lifetime was a timestamp, so the cookie expired in about 56 years. --- display.php | 2 +- session.lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/display.php b/display.php index de6082d..713f167 100644 --- a/display.php +++ b/display.php @@ -5,7 +5,7 @@ require_once('./get_data.lib.php'); $queue = get_queue(); if ($queue) session_cache_limiter('nocache'); else session_cache_limiter('none'); -session_set_cookie_params(array('lifetime' => strtotime('+1 year'), 'path' => '/', 'domain' => '.xxx.org.za', 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax')); +session_set_cookie_params(array('lifetime' => 0, 'path' => '/', 'domain' => '.xxx.org.za', 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax')); session_start(); if (isset($_SESSION['editor'])) { $is_admin = TRUE; diff --git a/session.lib.php b/session.lib.php index b5b18d2..639c4d6 100644 --- a/session.lib.php +++ b/session.lib.php @@ -6,7 +6,7 @@ $is_admin = FALSE; if (isset($_SERVER['HTTPS'])) { session_cache_limiter('private'); - session_set_cookie_params(array('lifetime' => strtotime('+1 year'), 'path' => '/', 'domain' => '.xxx.org.za', 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax')); + session_set_cookie_params(array('lifetime' => 0, 'path' => '/', 'domain' => '.xxx.org.za', 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax')); session_start(); if (isset($_SESSION['editor'])) {