Skip to content

Commit 935fa11

Browse files
enjeckbackportbot[bot]
authored andcommitted
fix: use mb_strtolower to convert login name
Signed-off-by: Cleopatra Enjeck M. <[email protected]>
1 parent de9e9ab commit 935fa11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/User/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ private function validateToken($token, $user = null) {
809809
* Check if login names match
810810
*/
811811
private function validateTokenLoginName(?string $loginName, IToken $token): bool {
812-
if (strcasecmp($token->getLoginName(), $loginName ?? '') !== 0) {
812+
if (mb_strtolower($token->getLoginName()) !== mb_strtolower($loginName ?? '')) {
813813
// TODO: this makes it impossible to use different login names on browser and client
814814
// e.g. login by e-mail '[email protected]' on browser for generating the token will not
815815
// allow to use the client token with the login name 'user'.

0 commit comments

Comments
 (0)