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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-09-01 09:49:56 +0300
committerGitHub <noreply@github.com>2022-09-01 09:49:56 +0300
commitaffa402d2106d9d8f7ec4cc28b79a388c18ec660 (patch)
tree2d733ee3d3aafc0909f8f2ea896a5ac1f01d26c3 /lib
parent248f5e93950a476b41c80bb0111a176186a13cc7 (diff)
parent0184fbe86baa79641aa724887b92fbcef2cef08d (diff)
Merge pull request #33772 from nextcloud/debug/remember-me-login-token-mispatch-session-unavailable
Diffstat (limited to 'lib')
-rw-r--r--lib/private/User/Session.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 626ddca2dad..65a213d4bf8 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -865,6 +865,10 @@ class Session implements IUserSession, Emitter {
$tokens = $this->config->getUserKeys($uid, 'login_token');
// test cookies token against stored tokens
if (!in_array($currentToken, $tokens, true)) {
+ $this->logger->error('Tried to log in {uid} but could not verify token', [
+ 'app' => 'core',
+ 'uid' => $uid,
+ ]);
return false;
}
// replace successfully used token with a new one
@@ -876,6 +880,10 @@ class Session implements IUserSession, Emitter {
$sessionId = $this->session->getId();
$token = $this->tokenProvider->renewSessionToken($oldSessionId, $sessionId);
} catch (SessionNotAvailableException $ex) {
+ $this->logger->warning('Could not renew session token for {uid} because the session is unavailable', [
+ 'app' => 'core',
+ 'uid' => $uid,
+ ]);
return false;
} catch (InvalidTokenException $ex) {
$this->logger->warning('Renewing session token failed', ['app' => 'core']);