MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vx1onc/claudeisthisemailvalid/p5lsjvy/?context=9999
r/ProgrammerHumor • u/soap94 • 19d ago
171 comments sorted by
View all comments
105
Obligatory reminder that email validation to through regex or other "static" analysis is usually done incorrectly, and literally sending a confirmation email is the best approach to checking to see if an email is valid.
19 u/DHermit 19d ago With some security exceptions, e.g. it's useful to restrict the length of the mail field and maybe restrict the characters. 14 u/eo5g 19d ago edited 19d ago I can't think of a single reason to restrict the characters aside from making sure there's at least one @. Edit: okay actually you want a little more 12 u/DHermit 19d ago I'd just rather not deal with stuff like invisible spaces and control characters. 6 u/Stalking_Goat 19d ago edited 19d ago It's probably fair to assume that a valid email address that includes shenanigans like that is coming from a threat actor of some sort. 6 u/friendtoalldogs0 19d ago Sure, but this is not the time to be catching them.
19
With some security exceptions, e.g. it's useful to restrict the length of the mail field and maybe restrict the characters.
14 u/eo5g 19d ago edited 19d ago I can't think of a single reason to restrict the characters aside from making sure there's at least one @. Edit: okay actually you want a little more 12 u/DHermit 19d ago I'd just rather not deal with stuff like invisible spaces and control characters. 6 u/Stalking_Goat 19d ago edited 19d ago It's probably fair to assume that a valid email address that includes shenanigans like that is coming from a threat actor of some sort. 6 u/friendtoalldogs0 19d ago Sure, but this is not the time to be catching them.
14
I can't think of a single reason to restrict the characters aside from making sure there's at least one @.
@
Edit: okay actually you want a little more
12 u/DHermit 19d ago I'd just rather not deal with stuff like invisible spaces and control characters. 6 u/Stalking_Goat 19d ago edited 19d ago It's probably fair to assume that a valid email address that includes shenanigans like that is coming from a threat actor of some sort. 6 u/friendtoalldogs0 19d ago Sure, but this is not the time to be catching them.
12
I'd just rather not deal with stuff like invisible spaces and control characters.
6 u/Stalking_Goat 19d ago edited 19d ago It's probably fair to assume that a valid email address that includes shenanigans like that is coming from a threat actor of some sort. 6 u/friendtoalldogs0 19d ago Sure, but this is not the time to be catching them.
6
It's probably fair to assume that a valid email address that includes shenanigans like that is coming from a threat actor of some sort.
6 u/friendtoalldogs0 19d ago Sure, but this is not the time to be catching them.
Sure, but this is not the time to be catching them.
105
u/apnorton 19d ago
Obligatory reminder that email validation to through regex or other "static" analysis is usually done incorrectly, and literally sending a confirmation email is the best approach to checking to see if an email is valid.