Skip to content

Commit 7ab39ef

Browse files
authored
Merge pull request #28413 from nextcloud/fix/app-token-login-name-mismatch-logging
2 parents 2c5d308 + a143337 commit 7ab39ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/private/User/Session.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,14 @@ private function validateToken($token, $user = null) {
788788

789789
// Check if login names match
790790
if (!is_null($user) && $dbToken->getLoginName() !== $user) {
791-
// TODO: this makes it imposssible to use different login names on browser and client
791+
// TODO: this makes it impossible to use different login names on browser and client
792792
// e.g. login by e-mail 'user@example.com' on browser for generating the token will not
793793
// allow to use the client token with the login name 'user'.
794+
$this->logger->error('App token login name does not match', [
795+
'tokenLoginName' => $dbToken->getLoginName(),
796+
'sessionLoginName' => $user,
797+
]);
798+
794799
return false;
795800
}
796801

0 commit comments

Comments
 (0)