Make admin email login case-insensitive - #2845
Open
wakqasahmed wants to merge 1 commit into
Open
wakqasahmed wants to merge 1 commit into
wakqasahmed wants to merge 1 commit into
Conversation
wakqasahmed
force-pushed
the
fix/case-insensitive-admin-email-login
branch
from
September 4, 2026 13:23
cf958ea to
dae4f9d
Compare
Author
|
Hi @ifox — noticed this PR doesn't have a reviewer assigned yet — it's been sitting for a while, CI is green and it's mergeable. Would you (or whoever's best placed) be able to take a look, or point me to who should? Thanks! |
Author
|
Hi @ifox — circling back on this one — still no reviewer assigned, quiet for a while since the last activity. No pressure, just don't want it to get lost. |
This branch has not been deployed
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.
Description
LoginController::credentials()passes the raw email input straight to the auth guard, so login is case-sensitive whenever theemailcolumn's collation is case-sensitive (e.g. Postgres, or MySQL with a_bin/case-sensitive collation) — a user created asUser@example.comcan't log in asuser@example.com. Changedcredentials()to match onLOWER(email)via a closure credential (Laravel'sEloquentUserProviderhas supported closures for custom query building since Laravel 8), so the match no longer depends on collation. Added an integration test that forces a case-sensitive collation onemailfor the duration of the test and restores it after — the default collation in this repo's own MySQL test DB is already case-insensitive, so a plain "log in with different case" test wouldn't have actually caught the regression.Used AI assistance (Claude) to write and test this; reviewed the diff and ran the full LoginTest suite plus php-cs-fixer before opening.
Related Issues
Fixes #2789