From cc8f1e1ace153edcf91b0752e999a2a20382a153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 2 May 2023 12:55:19 +0200 Subject: [PATCH] RVRNEXT-33 session should be valid for a session --- web.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/web.php b/web.php index b026a37..c0d3593 100644 --- a/web.php +++ b/web.php @@ -98,22 +98,12 @@ Container::$sessionHandler = new DatabaseSessionHandler( session_set_save_handler(Container::$sessionHandler, true); session_start([ 'gc_probability' => 0, // old sessions are deleted by MaintainDatabaseCommand - 'cookie_lifetime' => 604800, + 'cookie_lifetime' => 0, 'cookie_path' => '/', 'cookie_httponly' => true, 'cookie_samesite' => 'Lax' ]); -if (isset($_COOKIE[session_name()])) { - // extend session cookie lifetime is cookie already exists - setcookie(session_name(), session_id(), [ - 'expires' => time() + 604800, - 'path' => '/', - 'httponly' => true, - 'samesite' => 'Lax' - ]); -} - Container::$request = new Request( $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'], $_GET,