mirror of
https://github.com/nextcloud/server.git
synced 2026-02-11 23:04:22 -05:00
fix: Make sure to reopen session before cleaning
Otherwise restoring the requesttoken would reopen and read the existing session data and restore it instead of clearing Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
8d1142cfb9
commit
a6761d76ea
1 changed files with 4 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue