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

Maintain case when storing emails #688

Open
ghost opened this issue Feb 23, 2023 · 2 comments
Open

Maintain case when storing emails #688

ghost opened this issue Feb 23, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 23, 2023

When I register with an email with upper case letters, they are converted to lowercase.

This is happening here

I want to maintain the upper case letters. Is there a simple way to allow for this?

@danschultzer
Copy link
Collaborator

There's no way to do it now, but I could make it configurable. It's important to note that the user id MUST be case insensitive, hence why it gets lowercased by default: https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html#user-ids

There's no easy way to ensure the Ecto field/column is case insensitive, while not limiting the underlying database. And I wonder if making the normalization function configurable is the right approach. Why do you want it to maintain the case?

@ghost
Copy link
Author

ghost commented Feb 24, 2023

I have some users in my application who type their emails using uppercase letters. They complained about seeing their emails modified within the app.

More importantly though, from RFC 5321, section 2.3.11, the part before the "@" could be case-sensitive, since it is entirely under the control of the host system. This basically means that in rare cases, email delivery will fail for emails that needed to have upper case letters, and in my app I do send emails

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

No branches or pull requests

1 participant