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

#1497: Fix bad normalisation on Account.email #1582

Merged
merged 3 commits into from
May 22, 2020
Merged

#1497: Fix bad normalisation on Account.email #1582

merged 3 commits into from
May 22, 2020

Conversation

mauromsl
Copy link
Member

@mauromsl mauromsl commented May 21, 2020

Closes #1497

  • We swap from lowercasing email addresses to using django normalisation function
  • Email addresses are normalised at create time, rather than save to avoid modifying existing records
  • Usernames are still being lowercased to ensure case insensitive uniqueness at the database level
  • Query logic is left untouched, so account retrieval by email for accounts prior to this change should behave as they used to. Lookups by email for new accounts will be case sensitive depending on the DB table collation.

@mauromsl mauromsl requested a review from ajrbyers May 21, 2020 18:49
Copy link
Member

@ajrbyers ajrbyers left a comment

Choose a reason for hiding this comment

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

👍

@ajrbyers ajrbyers merged commit 6c77393 into master May 22, 2020
@ajrbyers ajrbyers deleted the 1497-Bugfix branch May 22, 2020 14:17
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.

Non normalized account lookups on emails leads to Integrity error
2 participants