I don't care who the IRS sends, I am not validating emails with spaces on them.
You shouldn’t be validating emails yourself anyway. Use a library or check for only the @
and then send an email confirmation.
What if we 👉@👈 ..? 🤭
If qoutes are removed and internal spaces are invalid, how could ":(){␣:|:&␣};:"@example.com
be valid?
I don't validate emails, I test them.
That's your email? OK, what did we send it? if we couldn't send to it or the user can't read it there's no reason to accept it.
OK, maybe I do some light validation first, but I don't trust the email address just because it's email-address-shaped.
What kind of "light validation"? I'm guessing a .*@.*
regex match.
@
matches
13 right answers and I didn't expect so many lol
I'll never validate some of the 💩 I've learnt today.
13 here too
Wow. if I ever have the madness required to self-host, I'll have my email at an IP address.
I'm gonna have a mailbox per device and the addresses will be deviceip@serverip. 10.254.17.5@145.80.205.19.
Needs to be IPv6, including support for subnets to message multiple devices
I don't think it really matters what the standard is, because you'll be completely limited by some 25 year old bit of Regex from Stack Overflow that every web developer ever has implemented into their form sanity checks.
The main one that gets passed around will match the weirdness fine. In fact, it probably matches things you don't want, anyway.
A signin/registration form really only needs to do sanity checks to get rid of obviously bad addresses. You'll have to send a round-trip email confirmation message to make sure the email is real, anyway, so why bother going into great detail? Just check that there's an '@' symbol and a dot in the domain. Most of the rest is wanking off.
A domaine without tld (me@home) is a valide address. I saw an email server being used as a mqtt-like server this way (it is very old and predate those software).
An address without a domain is irrelevant for a signin/registration form. Which is like 90% of the code being written in the wild to validate addresses.
If you're writing an email server, then you need to care about all these details. Most of us never will.
Hey! IPv6 is valid in the inter-network context and needs no dots!
You gonna fill an IPv6 address for your email server into the DoorDash signin page?
I got 13/21. I mean thats not bad 😄
Pretty much everything I've seen in e-mail is needlessly complicated and weird. So of course addresses are as well.
Question 5 is incorrect, name@example
is a fully valid email address, even after RFC 2822
The spec of RFC 2822 defines an address (3.4.1) as:
local- part "@" domain
domain
is defined (3.4.1) as:
domain = dot-atom / domain-literal / obs-domain
dot-atom
is defined (3.2.4) as:
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
1*atext
meaning at least 1 alphanumeric character, followed by *("." 1*atext)
meaning at least 0 "." 1*atext
If tomorrow, google decided to use its google
top-level domain as an email domain, it would be perfectly valid, as could any other company owning top-level domains
Google even owns a gmail
TLD so I wouldn't even be surprised if they decided to use it
I don't know if they changes the answer to the question, but it now says name@example
is valid.
It does say it's valid, but also that it's obsolete, and while the RFC does define valid but obsolete specs, there is nothing defining domains without a dot as obsolete, and it is in fact defined in the regular spec, not the obsolete section
I see what you mean, I'm with you now.
It says valid but obsolete, which sounds like a contradiction to me.
This is technically valid but considered obsolete. RFC 822 allowed domains without dots, but RFC 2822 made this obsolete.
Do email suffix not indicate a different domain like .org and .com for websites?
Two of my "favorite" features it didn't even touch on. You can have nested comments:
foo(one(two(three(four(five(six(seven)))))))@example.com
This will actually fail on that big email regex that gets copied around (originally from Mastering Regular Expressions in 1997), because it can only handle comment nesting to a depth of six. It is actually possible to do indefinite nesting now with recursive regex, but it was developed before that feature existed.
RFC822 also allows routing addresses through multiple servers:
<@foo.example.com@bar.example.com:123@example.com>
But this is almost always denied on modern email servers because it was abused by spammers.
The routing feature is so cursed XD
👉@👈
Bottom-ass email address.
No ring for that.
I scored 13/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.
Tap for spoiler
Email addresses can have comments?!
Nested comments. RFC822 had a whole bunch of bad ideas in it, but nobody thought much of it at the time. Most programming languages don't even do nested comments, because they want to filter them out with a simple lexer before the grammar ever sees it.
I had to make an email address just for paypal because those idiots don't accept subdomains in email addresses.
Pizza Hut doesn't allow dashes in the domain. This prevents me from ordering Pizza Hut with the email under my personal domain. This can be considered a feature.
My top five from this (all valid):
- ":(){␣:|:&␣};:"@example.com # fork bomb
- 👉@👈 and poop@[💩]
- "@"@[@]
- c̷̨̈́i̵̮̅l̶̠̐͊͝ȁ̷̠̗̆̍̍n̷͖̘̯̍̈͒̅t̶͍͂͋ř̵̞͈̓ȯ̷̯̠-̸͚̖̟͋s̴͉̦̭̔̆̃͒û̵̥̪͆̒̕c̸̨̨̧̺̎k̵̼͗̀s̸̖̜͍̲̈́͋̂͠@example.com
- fed-up-yet@␣example.com␣ # ␣ = whitespace
TIL that emoji transcend spoilers.
14 / 21
This is the score you get when you answer "valid" for every question. Good job.
My score was lower 💀
I didn't do that but got 14 anyway.
Same. I answered what i thought was correct and got 14!
14/21 gang
I scored 16/21 on https://e-mail.wtf/ and all I got was this lousy text to share on social media.
This was fun!
Edit: people, upvote the OP, not me
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics