From 9c286d8a0d69df9f92dbf7c4be46b629552b2f76 Mon Sep 17 00:00:00 2001 From: int2001 Date: Thu, 26 Oct 2023 05:30:25 +0000 Subject: [PATCH] Fixes Bug where cookie_samesite wasn't set --- system/libraries/Session/Session_driver.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/libraries/Session/Session_driver.php b/system/libraries/Session/Session_driver.php index d65c1381..5ceb18b3 100644 --- a/system/libraries/Session/Session_driver.php +++ b/system/libraries/Session/Session_driver.php @@ -150,6 +150,12 @@ abstract class CI_Session_driver implements SessionHandlerInterface { return; } + if (isset($this->_config['cookie_samesite'])) { + $css=$this->_config['cookie_samesite']; + } else { + $css=TRUE; + } + return setcookie( $this->_config['cookie_name'], '', @@ -159,7 +165,7 @@ abstract class CI_Session_driver implements SessionHandlerInterface { 'domain' => $this->_config['cookie_domain'], 'secure' => $this->_config['cookie_secure'], 'httponly' => TRUE, - 'samesite' => $this->_config['cookie_samesite'] + 'samesite' => $css ) ); }