From 35f7b4ca005d2300bdb57fbdc0d6df4e11ed70d0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 10 Oct 2024 09:55:54 +0200 Subject: [PATCH] session names must not be empty The changes done in #58453 were not enough. Since the session name is used as the cookie name it must not be the empty string. --- .../Storage/Handler/AbstractRedisSessionHandlerTestCase.php | 2 +- Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php b/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php index e73281173..0cf11c7de 100644 --- a/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php +++ b/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php @@ -106,7 +106,7 @@ public function testUseSessionGcMaxLifetimeAsTimeToLive() public function testDestroySession() { - $this->storage->open('', ''); + $this->storage->open('', 'test'); $this->redisClient->set(self::PREFIX.'id', 'foo'); $this->assertTrue((bool) $this->redisClient->exists(self::PREFIX.'id')); diff --git a/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php index 25edf922d..cd98a1fd4 100644 --- a/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php +++ b/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php @@ -119,7 +119,7 @@ public function testWriteSessionWithLargeTTL() public function testDestroySession() { - $this->storage->open('', ''); + $this->storage->open('', 'sid'); $this->memcached ->expects($this->once()) ->method('delete')