Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with case sensitive email addresses sent by some SSO providers #18883

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

Convly
Copy link
Member

@Convly Convly commented Nov 23, 2023

What does it do?

Use a case-insensitive lookup for admin users in the findOneByEmail method of the user service.

Why is it needed?

See #16982

How to test it?

  • Manually by executing yarn strapi console and then making a manual query to the admin user service.
  • Or just by running the unit tests

Related issue(s)/PR(s)

fix #16982

@Convly Convly added source: core:admin Source is core/admin package pr: fix This PR is fixing a bug labels Nov 23, 2023
@Convly Convly added this to the 4.15.5 milestone Nov 23, 2023
@innerdvations
Copy link
Contributor

Was this working in 4.14 and broken in 4.15? If not, let's target main to avoid potentially introducing something new.

@Convly
Copy link
Member Author

Convly commented Nov 23, 2023

I figured this could be an easy fix to have in the next release but if we want to be extra cautious I can target another version

innerdvations
innerdvations previously approved these changes Nov 23, 2023
Copy link
Contributor

@innerdvations innerdvations left a comment

Choose a reason for hiding this comment

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

LGTM!

Just to be sure, I also confirmed that the unique check on account creation is case insensitive (that is, it shouldn't be possible to have multiple accounts with different casing) so this should be safe.

@Convly Convly force-pushed the fix/case-insensitive-user-lookup-by-email branch from 545522a to fc55046 Compare November 23, 2023 09:54
@Convly Convly changed the base branch from releases/4.15.5 to main November 23, 2023 09:54
@Convly Convly dismissed innerdvations’s stale review November 23, 2023 09:54

The base branch was changed.

@innerdvations
Copy link
Contributor

I figured this could be an easy fix to have in the next release but if we want to be extra cautious I can target another version

Yeah, it seems very simple and totally safe to me, but those are always the ones that always seem to end up breaking something unexpected 😆

@Convly Convly modified the milestones: 4.15.5, 4.15.6 Nov 23, 2023
@derrickmehaffy
Copy link
Member

building experimental: https://github.com/strapi/strapi/actions/runs/7090551315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:admin Source is core/admin package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants