Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/SessionService.php')
-rw-r--r--lib/Service/SessionService.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php
index d02d2ad0b..16d1fcabb 100644
--- a/lib/Service/SessionService.php
+++ b/lib/Service/SessionService.php
@@ -152,7 +152,14 @@ class SessionService {
$data = $this->cache->get($token);
if ($data !== null) {
- return Session::fromRow(json_decode($data, true));
+ $session = Session::fromRow(json_decode($data, true));
+ if ($session->getId() !== $sessionId || $session->getDocumentId() !== $documentId) {
+ $this->cache->remove($token);
+ $this->session = false;
+ return false;
+ }
+
+ return $session;
}
try {