Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Improve string comparison
Signed-off-by: Cleopatra Enjeck M. <[email protected]>
  • Loading branch information
enjeck authored and backportbot[bot] committed Mar 5, 2025
commit 9dbf067f3116e410564ac064acbd9c0efc50dbb1
2 changes: 1 addition & 1 deletion lib/private/User/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ private function validateToken($token, $user = null) {
* 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 '[email protected]' on browser for generating the token will not
// allow to use the client token with the login name 'user'.
Expand Down