Live data from Hacker News

The Correct Way to Validate Email Addresses

hackernoon.com

201–210 of 405 posts

Re: The Correct Way to Validate Email Addresses

#201

Earlier quoted context omitted.

> combined characters like ´e (can't type the correct e with accent mark) You mean é ? :-)

Yes. OS X keyboard drives me nuts sometimes, Karabiner can only fix some bits of the weirdness.

On Windows[1], á é í ó ú are achieved by holding down Ctrl+Alt and then pressing the appropriate letter.

--

[1] Yes, I know you are OSX, but someone else reading this might not be.

Re: The Correct Way to Validate Email Addresses

#202
post #67

Earlier quoted context omitted.

I've got an account where they just plain stripped the + character. Since I happen to have used only alphanumeric charters after, I am now registered with an email address I can't actually receive mail on - it goes to somebody else's inbox. Account synchronization was involved - IIRC the initial address confirmation message got thorough.

I thought that though the + is valid, nothing after the + is used to differentiate the email address? I use local+Organization when I sign up for an email list so that I can easily filter, plus I can see if that email address gets shared around. So on places that reject the + I just use everything before it as the local part. Maybe I'm missing something. Edit: I guess not all email providers do it this way but here's…

Yeah, of course it will work, but then it's harder to filter their mail to an appropriate folder.

Re: The Correct Way to Validate Email Addresses

#203

The number of websites that try reject my email address with a + in it, ugh! Surprisingly, the validation is often done 100% client-side anyway, and simply modifying the incorrect regex lets my email address through... If I wrecked havoc on your back-end, then it's your fault for sucking ;)

Worse than that: I've encountered a few web sites which accept email addresses with '+' characters... and then tell me that my email address has a ' ' character in it. Every time I see this I think "there's got to be a multiple-form-decoding vulnerability here"...

...and they probably send the confirmation mail to two addresses, both wrong.

Re: The Correct Way to Validate Email Addresses

#204

The number of websites that try reject my email address with a + in it, ugh! Surprisingly, the validation is often done 100% client-side anyway, and simply modifying the incorrect regex lets my email address through... If I wrecked havoc on your back-end, then it's your fault for sucking ;)

Can you name some popular websites that do this? Speaking as someone who uses + addresses to filter stuff from mostly well-known websites, I have never seen this. I have seen this a few times on old, crusty, finance websites etc. but I hardly ever need to use a + address with them anyway. (It does make me wonder about how good their internal security is, though.)

Airlines, like klm.com. I could book using a + suffix, but not check in online.

Re: The Correct Way to Validate Email Addresses

#205

The one thing I systematically do in term of email validation is catch the common typos of the main providers. So things like gmail.con, hotmai.com, gmall.com and so on. In 99% of those cases, it prevents someone from entering a wrong email. We do not do email activation by forcing people to click a link in their email to validate that they received it since that causes a drop in the funnel and reduces the amount of…

I like activation emails, because it shows the website cares about being able to email me. Then again, I'm a technical user.

Re: The Correct Way to Validate Email Addresses

#206
post #170

Earlier quoted context omitted.

A former employer, that I will decline to mention by name, stored a hash of the password AND the plaintext in the database so it could be sent to people via email when they forgot it. I tried to explain to my boss why this was such a terrible idea and he was not hearing any of it.

If I ever use the "forgot my password" functionality at a site and they mail out something that is probably my original password, I make a point of cancelling my account and sending them an e-mail explaining why I don't trust them any more.

And submitting the site to http://plaintextoffenders.com

Re: The Correct Way to Validate Email Addresses

#207
post #205

The one thing I systematically do in term of email validation is catch the common typos of the main providers. So things like gmail.con, hotmai.com, gmall.com and so on. In 99% of those cases, it prevents someone from entering a wrong email. We do not do email activation by forcing people to click a link in their email to validate that they received it since that causes a drop in the funnel and reduces the amount of…

I like activation emails, because it shows the website cares about being able to email me. Then again, I'm a technical user.

I like them as well, but for a different reason - I have a way to find what email I used for particular website, if I used it, etc. Doesn't have to be the clicky linky mail, just a confirmation mail will do.

But if you include plain text password in it... ugh.

Re: The Correct Way to Validate Email Addresses

#208
One more thing that irks me is that some websites capitalize or lowercase the part before the @. Email servers are allowed to treat that part case-sensitively, although most don't. (The part after the @ is indeed case-insensitive.)

Re: The Correct Way to Validate Email Addresses

#209

No. Absolutely beginner level blog post. You would use a third party tool like http://www.datavalidation.com/ or mailgun's email validation service or BriteVerify etc etc. There are a ton of validation services now. We are living in a time when trillions of email addresses have been tried, entered and deployed to. So why reinvent the wheel on your website? 3rd party services are based not only on parsing the string b…

That is a terrible thing to do with regard protecting your users' personal data!

Re: The Correct Way to Validate Email Addresses

#210
post #196

The number of websites that try reject my email address with a + in it, ugh! Surprisingly, the validation is often done 100% client-side anyway, and simply modifying the incorrect regex lets my email address through... If I wrecked havoc on your back-end, then it's your fault for sucking ;)

I agree that it's annoying. But I have an acquaintance who is constantly bickering and venting about this issue. If he strongly suspects that a signup form will reject his plus address, he will enter it even more fervently to prove they are idiots. I'm firmly on the side of "Too bad. Maybe you could simply move on with your life? Just use a dash if you need sub-mailboxes"

Is a dash the same as a "+"? According to some quick googling it depends on your provider. If his provider relies on the "+" for sub-addressing what good will a dash do him?

Why are you so firm on this position when it seems to be a legitimate problem for him?

Post reply on HN