-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit an error log when the app token login name does not match
Signed-off-by: Christoph Wurst <[email protected]>
- Loading branch information
1 parent
05ec2fa
commit a143337
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -788,9 +788,14 @@ private function validateToken($token, $user = null) { | |
|
||
// 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 '[email protected]' 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; | ||
} | ||
|
||
|