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(signup/serializer): Add validate_email to do case insenstive lookup at signup #419

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

gagantrivedi
Copy link
Member

@gagantrivedi gagantrivedi commented Oct 18, 2021

Add validate_email that does a case insensitive lookup
using the email to see a user exists with that email, and returns
the email with all lower case letters

closes #415

@dabeeeenster
Copy link
Contributor

dabeeeenster commented Oct 18, 2021

Is the title correct for this PR? "remove case insensitive search on user email" - not sure what removing get_by_natural_key actually achieves here? I feel like we should not allow BEN@flagsmith.com and ben@flagsmith.com to both register, even if it breaks the RFC. I feel like if BEN@flagsmith.com exists in our DB, we should not allow ben@flagsmith.com to register.

Also I don't believe we use the username field currently?

@matthewelwell
Copy link
Contributor

Yeah, this is not the right approach here. We need to ensure that emails are being stored case insensitive on sign up to avoid any issues with this.

Add validate_email that does a case insensitive  lookup
using the email to see a user exists with that email, and returns
the email with all lower case letters
@gagantrivedi gagantrivedi changed the title fix(user/login): remove case insensitive search on user email fix(signup/serializer): Add validate_email to do case insenstive lookup at signup Oct 19, 2021
@matthewelwell matthewelwell removed their assignment Oct 26, 2021
@gagantrivedi gagantrivedi merged commit b0953b9 into main Oct 28, 2021
@gagantrivedi gagantrivedi deleted the fix/github-415/duplicate-email branch October 28, 2021 02:13
@dabeeeenster dabeeeenster mentioned this pull request Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

register process allows use of existing email due to case sensitive lookup
3 participants