tvallotton / rocket_auth

An implementation for an authentication API for Rocket applications.
https://docs.rs/rocket_auth/
Apache License 2.0
73 stars 35 forks source link

Make email none-case-sensitive #32

Open ywegel opened 2 years ago

ywegel commented 2 years ago

When creating/signing up a user with the same email but upper and lowercase (e.g.: mail@domain.com and Mail@domain.com) your crate creates two different users. As far as i know emails are none-case-sensitive. I fixed this by applying .to_lowercase() to the email, but i think it would be good to warn for this in the documentation or to apply this in your users.create_user() and signup() function

tvallotton commented 2 years ago

Noted, this will be fixed for the next release. Thank you.

quentinmit commented 12 months ago

E-mail addresses can't be assumed to be case-insensitive; only the domain name portion of an e-mail address is case-insensitive. See https://beesbuzz.biz/code/439-Falsehoods-programmers-believe-about-email