Make the session cookie last until the browser closes.
The lifetime was a timestamp, so the cookie expired in about 56 years.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ require_once('./get_data.lib.php');
|
|||||||
$queue = get_queue();
|
$queue = get_queue();
|
||||||
if ($queue) session_cache_limiter('nocache');
|
if ($queue) session_cache_limiter('nocache');
|
||||||
else session_cache_limiter('none');
|
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();
|
session_start();
|
||||||
if (isset($_SESSION['editor'])) {
|
if (isset($_SESSION['editor'])) {
|
||||||
$is_admin = TRUE;
|
$is_admin = TRUE;
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ $is_admin = FALSE;
|
|||||||
|
|
||||||
if (isset($_SERVER['HTTPS'])) {
|
if (isset($_SERVER['HTTPS'])) {
|
||||||
session_cache_limiter('private');
|
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();
|
session_start();
|
||||||
|
|
||||||
if (isset($_SESSION['editor'])) {
|
if (isset($_SESSION['editor'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user