Skip to content

Commit 1a1a810

Browse files
authored
Merge pull request #34955 from nextcloud/backport/34934/stable25
[stable25] Read encrypted session data again on reopen
2 parents 695ceba + c6b2d08 commit 1a1a810

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/private/Session/CryptoSessionData.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ public function remove(string $key) {
143143
$reopened = $this->reopen();
144144
$this->isModified = true;
145145
unset($this->sessionValues[$key]);
146-
$this->session->remove(self::encryptedSessionName);
147146
if ($reopened) {
148147
$this->close();
149148
}
@@ -163,7 +162,11 @@ public function clear() {
163162
}
164163

165164
public function reopen(): bool {
166-
return $this->session->reopen();
165+
$reopened = $this->session->reopen();
166+
if ($reopened) {
167+
$this->initializeSession();
168+
}
169+
return $reopened;
167170
}
168171

169172
/**

0 commit comments

Comments
 (0)