From: Manuel Flandorfer Date: Thu, 7 Dec 2023 20:23:43 +0000 (+0000) Subject: Change session cookie name CIVISOSESSID -> SESSCIVISO X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d802dbee94ba6b5cc1596dc6b041bee97153cc27;p=civicrm-core.git Change session cookie name CIVISOSESSID -> SESSCIVISO --- diff --git a/CRM/Utils/System/Standalone.php b/CRM/Utils/System/Standalone.php index 0604fd6ebf..d313f60a98 100644 --- a/CRM/Utils/System/Standalone.php +++ b/CRM/Utils/System/Standalone.php @@ -591,7 +591,7 @@ class CRM_Utils_System_Standalone extends CRM_Utils_System_Base { session_start([ 'cookie_httponly' => 1, 'gc_maxlifetime' => $session_max_lifetime, - 'name' => 'CIVISOSESSID', + 'name' => 'SESSCIVISO', 'use_cookies' => 1, 'use_only_cookies' => 1, 'use_strict_mode' => 1, diff --git a/ext/standaloneusers/tests/phpunit/Civi/Standalone/SessionHandlerTest.php b/ext/standaloneusers/tests/phpunit/Civi/Standalone/SessionHandlerTest.php index e49eb1600a..88965d702a 100644 --- a/ext/standaloneusers/tests/phpunit/Civi/Standalone/SessionHandlerTest.php +++ b/ext/standaloneusers/tests/phpunit/Civi/Standalone/SessionHandlerTest.php @@ -31,7 +31,7 @@ class SessionHandlerTest extends TestCase implements EndToEndInterface { $session_handler = new SessionHandler(); // Open a session - $session_handler->open('/path', 'CIVISOSESSID'); + $session_handler->open('/path', 'SESSCIVISO'); // Create a unique session ID $session_id = $session_handler->create_sid(); @@ -58,7 +58,7 @@ class SessionHandlerTest extends TestCase implements EndToEndInterface { sleep(1); // Re-open the session - $session_handler->open('/path', 'CIVISOSESSID'); + $session_handler->open('/path', 'SESSCIVISO'); // Validate the session $this->assertTrue($session_handler->validateId($session_id)); @@ -89,7 +89,7 @@ class SessionHandlerTest extends TestCase implements EndToEndInterface { sleep(1); // Re-open the session - $session_handler->open('/path', 'CIVISOSESSID'); + $session_handler->open('/path', 'SESSCIVISO'); // Validate the session $this->assertTrue($session_handler->validateId($session_id)); @@ -121,7 +121,7 @@ class SessionHandlerTest extends TestCase implements EndToEndInterface { ->execute(); // Open a new session to trigger garbage collection - $session_handler->open('/path', 'CIVISOSESSID'); + $session_handler->open('/path', 'SESSCIVISO'); $new_sid = $session_handler->create_sid(); $session_handler->read($new_sid); @@ -148,14 +148,14 @@ class SessionHandlerTest extends TestCase implements EndToEndInterface { $tx = new \CRM_Core_Transaction(); // Create a new session - $session_handler->open('/path', 'CIVISOSESSID'); + $session_handler->open('/path', 'SESSCIVISO'); $session_id = $session_handler->create_sid(); $session_handler->read($session_id); $session_handler->write($session_id, 'CiviCRM|a:0:{}'); $session_handler->close(); // Re-open the session - $session_handler->open('/path', 'CIVISOSESSID'); + $session_handler->open('/path', 'SESSCIVISO'); $session_handler->validateId($session_id); $session_handler->read($session_id); $session_handler->write($session_id, 'CiviCRM|a:1:{s:4:"ufID";i:1}');