Skip to content

Conversation

@enjeck
Copy link
Contributor

@enjeck enjeck commented Feb 24, 2025

Summary

Use case insensitive check when validating login name

TODO

Checklist

@susnux susnux added the 3. to review Waiting for reviews label Feb 24, 2025
@enjeck enjeck force-pushed the case-insensitive-login branch 3 times, most recently from f9b7d47 to 126563c Compare February 25, 2025 06:37
blizzz
blizzz previously requested changes Feb 26, 2025
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from strcasecmp docs:

Binary safe case-insensitive string comparison. The comparison is not locale aware; only ASCII letters are compared in a case-insensitive way.

Contrary to the user id, there is no restriction on characters on login names.

Better to switch to mb_strtolower?

@susnux
Copy link
Contributor

susnux commented Feb 26, 2025

Better to switch to mb_strtolower?

Oh yes I missed that (maybe because there is no mb_strcasecmp) so mb_strtolower is probably the best (better than Collator I think).

@susnux susnux added this to the Nextcloud 32 milestone Mar 2, 2025
enjeck added 3 commits March 5, 2025 05:00
Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
@enjeck enjeck force-pushed the case-insensitive-login branch from 961d47b to 32e46a8 Compare March 5, 2025 05:00
@enjeck enjeck requested a review from a team as a code owner March 5, 2025 05:00
@enjeck enjeck requested review from come-nc, icewind1991 and sorbaugh and removed request for a team March 5, 2025 05:00
@enjeck
Copy link
Contributor Author

enjeck commented Mar 5, 2025

/backport to stable31

@enjeck enjeck merged commit a4760ef into master Mar 5, 2025
190 checks passed
@enjeck enjeck deleted the case-insensitive-login branch March 5, 2025 06:19
@enjeck
Copy link
Contributor Author

enjeck commented Mar 5, 2025

/backport to stable30

@enjeck
Copy link
Contributor Author

enjeck commented Mar 5, 2025

/backport to stable29

@enjeck
Copy link
Contributor Author

enjeck commented Mar 5, 2025

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Case sensitive generation of app tokens not based on stored usernames

6 participants