News for hackers. Stuff that matters.
Re:Complexities of e-mail validation logic by NikolaNovak on Monday May 24, 2021 @05:39PM (#27270031)
I get your point, but it ends up pretty arbitrary who picks up what part of spec to implement / which part of spec they deem "common sense".

e.g. It drives me BONKERS how many systems absolutely reject my single-letter email (~"[email protected]"), which I created specifically to make it easy and safe to type on mobile devices etc. Others will reject the "+" sign, or underscore, or dot/period, or (brilliantly) two periods or underscors, etc etc etc :=/

Re:Complexities of e-mail validation logic by Strom on Monday May 24, 2021 @06:30PM (#27270448)
There are also blacklists for names you can use. My real e-mail is [email protected] but Facebook doesn't allow me to use that e-mail, warning me that only personal e-mails are allowed. Paradoxically I ended up using my work e-mail to get around the restriction.
Re:Complexities of e-mail validation logic by AgentME on Monday May 24, 2021 @09:15PM (#27271649)
Agreed. Anyone that decides to come up with a "common sense" subset of emails to allow is more likely to accidentally block some perfectly normal addresses than actually accomplish something useful. I remember I once made this point in an HN thread, and I got a very dismissive and overconfident reply by someone who posted a regex that turned out to block my own email address (which had a number immediately before the @ symbol).

Writing code that doesn't need to exist that has a possible failure mode of not letting someone sign up at all is just a bad decision. If you're going to write that code, either go through the effort of getting it completely right or soften the failure mode. If you really think the user is somehow mistyping their email with special characters or an unusual TLD, then you could show them a non-blocking warning message.

Re:Complexities of e-mail validation logic by hwbehrens on Monday May 24, 2021 @06:17PM (#27270347)
My email address ends with the .cc TLD, and the number of websites which say "Did you mean to type .ca?" and then refuse to let me continue without changing it drives me similarly batty.
Re:Complexities of e-mail validation logic by skissane on Monday May 24, 2021 @10:18PM (#27271980)
Maybe what we need is a narrower standard that subsets RFC5322 to remove (or at least deprecate) rarely used address syntaxes, such as double-quoted local parts.

(Actually RFC5322 already deprecates some syntaxes. For example, "John Hacker"."Ph.D., Esq."@example.com is a deprecated syntax (obs-local-part), because it contains multiple quoted-string components separated by dots.)

> or (brilliantly) two periods or underscors

Two or more consecutive periods is actually disallowed by RFC5322 (unless quoted). [email protected] is a valid address, [email protected] is not. ("foo..bar"@example.com is however)

Re:Complexities of e-mail validation logic by ivan888 on Monday May 24, 2021 @07:17PM (#27270833)
I don’t even have anything weird going on with mine other than using my own domain with a less common 2 letter country code TLD, but it gets me rejected from signing up to at least a few services per year
Re:Complexities of e-mail validation logic by mobjack on Monday May 24, 2021 @08:48PM (#27271481)
Customer complaints usually determine the spec.

If enough people wrote in about not accepting one letter email addresses, then they would likely update the validation.

But if customer service tells users to use another email address in that scenario and the customer does that, then it might not be worth the effort to fix it.

Re:Complexities of e-mail validation logic by bombcar on Monday May 24, 2021 @10:20PM (#27271983)
It’s getting to where if you support @gmail.com and no other you’d still get 80% of signups.

Better to warm an email doesn’t look right, but let them continue if they want to

Re:Complexities of e-mail validation logic by labawi on Tuesday May 25, 2021 @04:53PM (#27282493)
I think it's more likely the marketing department doesn't like people leaving fake addresses.

When I want to check postage or whatever, and they require an email address, [email protected] typically doesn't work, but [email protected] does.