-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Convert to lowercase before email lookup #1420
Conversation
This fixes an issue where a user could not login because they are accustomed to case-sensitive email addresses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't get much simpler, nice one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, this is better than doing a case-insensitive search with Mongo, because in Mongo that requires using the $regex
matcher and emails can have all kinds of characters that have special meanings in regex, such as the widely-used robin.munn+sometag@gmail.com
feature. So my solution would have required extensive testing of the regex quoting, whereas if we know that we are already storing all email addresses in lowercased form, then this is better.
…loyment This reverts commit b92397e. After deployment we will revert this revert and restore the feature.
…loyment This reverts the revert of this feature, which can be merged into our next deployment.
Tested on QA. No Issues, all tests passed. |
Description
This fixes an issue where a user could not login because they are accustomed to case-sensitive email addresses. This is a simpler implementation of #1419 , given that we know that all our email addresses are already lowercase.
Fixes #1418
Type of Change
Only keep lines below that describe this change, then delete the rest.
Testing on your branch
Locally on develop, sign-up for an account and then login using your email address (lowercase). Verify that it works. Now, logout and login with part of the email typed with capital letters e.g.
Me@example.com
You will get an invalid username/password error.Now on this branch, repeat the testing and verify that capital letters in the email address login field do not make a difference. You should be able to login using e.g.
ME@example.com
just fine.Checklist
qa.languageforge.org testing
Reviewers: add/replace your name below and check the box to sign-off/attest the feature works as expected on qa.languageforge.org