diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-09-01 08:49:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 08:49:56 +0200 |
commit | affa402d2106d9d8f7ec4cc28b79a388c18ec660 (patch) | |
tree | 2d733ee3d3aafc0909f8f2ea896a5ac1f01d26c3 /lib | |
parent | 248f5e93950a476b41c80bb0111a176186a13cc7 (diff) | |
parent | 0184fbe86baa79641aa724887b92fbcef2cef08d (diff) | |
download | nextcloud-server-affa402d2106d9d8f7ec4cc28b79a388c18ec660.tar.gz nextcloud-server-affa402d2106d9d8f7ec4cc28b79a388c18ec660.zip |
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.php | 8 |
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']); |