diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 77993f737a5..7a21473d20c 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -780,7 +780,7 @@ class Session implements IUserSession, Emitter { * Check if login names match */ private function validateTokenLoginName(?string $loginName, IToken $token): bool { - if (strtolower($token->getLoginName() ?? '') !== strtolower($loginName ?? '')) { + if (strcasecmp($token->getLoginName(), $loginName ?? '') !== 0) { // 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'.