From b3dcecf987ab18881b172fc1b9223e44f0d5b7d2 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 7 Aug 2020 22:49:48 -0400 Subject: [PATCH 1/2] Revert "Actually destroy session on logout" This reverts commit 077b57ecb38e7114539a54c0670a4930d434c276. --- src/Core/Session/Native.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Core/Session/Native.php b/src/Core/Session/Native.php index 83ed0f6e6..49550a27c 100644 --- a/src/Core/Session/Native.php +++ b/src/Core/Session/Native.php @@ -53,9 +53,4 @@ class Native extends AbstractSession implements ISession session_start(); return $this; } - - public function clear() - { - session_destroy(); - } } From bc02ad89d0869496f9f26a969f211d3d1365d4d3 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 7 Aug 2020 22:50:16 -0400 Subject: [PATCH 2/2] Add support for empty session write - Ignored empty data left session intact, leading to unexpected behaviors --- src/Core/Session/Handler/Cache.php | 2 +- src/Core/Session/Handler/Database.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Session/Handler/Cache.php b/src/Core/Session/Handler/Cache.php index 5aec68e63..af82deb58 100644 --- a/src/Core/Session/Handler/Cache.php +++ b/src/Core/Session/Handler/Cache.php @@ -87,7 +87,7 @@ class Cache implements SessionHandlerInterface } if (!$session_data) { - return true; + return $this->destroy($session_id); } return $this->cache->set('session:' . $session_id, $session_data, Session::$expire); diff --git a/src/Core/Session/Handler/Database.php b/src/Core/Session/Handler/Database.php index 3c2f9027a..c61402954 100644 --- a/src/Core/Session/Handler/Database.php +++ b/src/Core/Session/Handler/Database.php @@ -94,7 +94,7 @@ class Database implements SessionHandlerInterface } if (!$session_data) { - return true; + return $this->destroy($session_id); } $expire = time() + Session::$expire;