diff options
-rw-r--r-- | lib/private/Session/CryptoSessionData.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php index df810d5b30c..1eb6987fc18 100644 --- a/lib/private/Session/CryptoSessionData.php +++ b/lib/private/Session/CryptoSessionData.php @@ -152,6 +152,7 @@ class CryptoSessionData implements \ArrayAccess, ISession { * Reset and recreate the session */ public function clear() { + $reopened = $this->reopen(); $requesttoken = $this->get('requesttoken'); $this->sessionValues = []; if ($requesttoken !== null) { @@ -159,6 +160,9 @@ class CryptoSessionData implements \ArrayAccess, ISession { } $this->isModified = true; $this->session->clear(); + if ($reopened) { + $this->close(); + } } public function reopen(): bool { |