Re:Hacking GitHub's Auth with Unicode's Turkish Dotless 'I'
by Avamander on Monday December 16, 2019 @11:02PM
(#21810414)
Just... don't try to validate it like that. Check if you can send an e-mail to it, if you can then it's fine. I see way too many devs thinking they can validate e-mails with regex and then I can't use my own name in my e-mail.
[ Parent
| on HN ]
Re:Hacking GitHub's Auth with Unicode's Turkish Dotless 'I'
by iudqnolq on Monday December 16, 2019 @11:11PM
(#21810476)
I agree completely. I might do .+@.+\..+ on the frontend to catch people mixing up usernames and emails, but that's it.
You might not be surprised that regex comes from a Perl module :)
Re:Hacking GitHub's Auth with Unicode's Turkish Dotless 'I'
by Avamander on Monday December 16, 2019 @11:16PM
(#21810500)
To be honest, login forms should take both username and e-mail as the user identifier, far too often they don't. I personally think that the only place where such a regex should exist is during sign-up.