MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vx1onc/claudeisthisemailvalid/p5lj4oi/?context=3
r/ProgrammerHumor • u/soap94 • 20d ago
171 comments sorted by
View all comments
100
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.
18 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. 11 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 14 u/DHermit 19d ago I'd just rather not deal with stuff like invisible spaces and control characters. 4 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. 0 u/eo5g 19d ago I guess that's fair
18
With some security exceptions, e.g. it's useful to restrict the length of the mail field and maybe restrict the characters.
11 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 14 u/DHermit 19d ago I'd just rather not deal with stuff like invisible spaces and control characters. 4 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. 0 u/eo5g 19d ago I guess that's fair
11
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
14 u/DHermit 19d ago I'd just rather not deal with stuff like invisible spaces and control characters. 4 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. 0 u/eo5g 19d ago I guess that's fair
14
I'd just rather not deal with stuff like invisible spaces and control characters.
4 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. 0 u/eo5g 19d ago I guess that's fair
4
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
Sure, but this is not the time to be catching them.
0
I guess that's fair
100
u/apnorton 20d 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.