summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-08-18 16:35:34 +0200
committerGitHub <noreply@github.com>2021-08-18 16:35:34 +0200
commit67cbb0318d50b1df9d16bc2181a1ce266135a9cf (patch)
tree608fcf580c7b2fb3d475ce28cbc8694803901820
parent7879484950c3ca2eb8aaba772137cf378784371f (diff)
parent461e9079b95b3473dfa0e1a13967a98a79baf0c4 (diff)
downloadnextcloud-server-67cbb0318d50b1df9d16bc2181a1ce266135a9cf.tar.gz
nextcloud-server-67cbb0318d50b1df9d16bc2181a1ce266135a9cf.zip
Merge pull request #28489 from nextcloud/backport/28413/stable22
[stable22] Emit an error log when the app token login name does not match
-rw-r--r--lib/private/User/Session.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 4ce99512040..fa6f14fd3ec 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -788,9 +788,14 @@ class Session implements IUserSession, Emitter {
// Check if login names match
if (!is_null($user) && $dbToken->getLoginName() !== $user) {
- // TODO: this makes it imposssible to use different login names on browser and client
+ // TODO: this makes it impossible to use different login names on browser and client
// e.g. login by e-mail 'user@example.com' on browser for generating the token will not
// allow to use the client token with the login name 'user'.
+ $this->logger->error('App token login name does not match', [
+ 'tokenLoginName' => $dbToken->getLoginName(),
+ 'sessionLoginName' => $user,
+ ]);
+
return false;
}