Added collations migration to make username lookups case-insensitive (#2803)#2974
Open
jestrada51 wants to merge 2 commits into
Open
Added collations migration to make username lookups case-insensitive (#2803)#2974jestrada51 wants to merge 2 commits into
jestrada51 wants to merge 2 commits into
Conversation
added 2 commits
December 10, 2025 01:53
…h allows for case insensitivity for the username property in api endpoints
… Current Migration satisfies the username case insensitivity for the API endpoints
Member
|
@jestrada51 Kindly check on the Static Code Analysis issues flagged by Codacy, and also make sure your commits are signed. You can learn about signing your commits here: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
Contributor
|
@jestrada51 Kindly make the following changes:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes / Features implemented
Updated solution from the previous pull request #2966
Added a database migration that adds collations to the auth_user username field so username lookups within the API endpoints become case-insensitive.
Added a regression test (TestCaseInsensitiveUserQuery) that confirms /api/v1/profiles.json?users= correctly matches users regardless of casing (bob, Bob, bOb, etc.).
Steps taken to verify this change does what is intended
Manual verification of the migration was done to ensure that the collation was properly added
Manual verification of the API endpoints in curl was done in accordance to the example in the original #2803 post to ensure correct behavior
Test case was ran with different variants of the target username in order to make sure applying the collation leads for case insensitivity.
Side effects of implementing this change
Api endpoints such as:
and
are now case insensitive
Before submitting this PR for review, please make sure you have: