Live data from Hacker News

The Correct Way to Validate Email Addresses

hackernoon.com

301–310 of 405 posts

Re: The Correct Way to Validate Email Addresses

#301

Earlier quoted context omitted.

> 'Non-routable' as in a single label, or as in not resolvable. I don't think it is unreasonable to consider an address invalid when its domain part cannot be resolved. What exactly do you mean by "cannot be resolved"? > Checking for RFC1918 ranges means you don't try to send to another class of addresses that's never going to be received. But why check for it? Is that actually a common mistake people make? An attack…

"Cannot be resolved" means NXDOMAIN. Why assume email addresses only get checked in one place, and not all? Ten million a day was a milestone. I left that company over a year ago; it would astonish me to find that figure now exceeded by less than a factor of twenty. Granted these are mostly not signups. They are outgoing emails nonetheless, which makes the case germane despite that superficial distinction. Your propo…

NXDOMAIN can be a temporary error. The SMTP queuing protocol is designed to be resilient against DNS failures, internet outages, routing problems, and temporary mail delivery issues.

Re: The Correct Way to Validate Email Addresses

#302

Earlier quoted context omitted.

> 'Non-routable' as in a single label, or as in not resolvable. I don't think it is unreasonable to consider an address invalid when its domain part cannot be resolved. What exactly do you mean by "cannot be resolved"? > Checking for RFC1918 ranges means you don't try to send to another class of addresses that's never going to be received. But why check for it? Is that actually a common mistake people make? An attack…

"Cannot be resolved" means NXDOMAIN. Why assume email addresses only get checked in one place, and not all? Ten million a day was a milestone. I left that company over a year ago; it would astonish me to find that figure now exceeded by less than a factor of twenty. Granted these are mostly not signups. They are outgoing emails nonetheless, which makes the case germane despite that superficial distinction. Your propo…

[deleted]

Re: The Correct Way to Validate Email Addresses

#303

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 ;)

Even worse is rejecting my password because it has a + in it! Why do you as a business care what my random password generator spit out?? Scarier still is when it's a server-side response that rejects my password for its contents...

Meet Time Warner Cable. Time Warner, which has an obscenity filter on their passwords. Enforced server-side!

Bets on how long before those folks make the news for losing a hundred million unhashed passwords?

Re: The Correct Way to Validate Email Addresses

#305

Earlier quoted context omitted.

> At no time is the plain text password stored anywhere Hopefully. When I see rules limiting passwords to 16 characters and disallowing SQL special characters, I'm having doubts.

My bank limits passwords at 15 characters. The best thing? There is no verification, it just cuts off. Have fun figuring out why you can not login anymore.

When I was doing my taxes 2 years ago, I got bitten by the H&R Block website doing that. It did not inspire the trust.

Re: The Correct Way to Validate Email Addresses

#306

Earlier quoted context omitted.

> At no time is the plain text password stored anywhere Hopefully. When I see rules limiting passwords to 16 characters and disallowing SQL special characters, I'm having doubts.

My bank limits passwords at 15 characters. The best thing? There is no verification, it just cuts off. Have fun figuring out why you can not login anymore.

And this from the same industry that pretends showing me a picture of a squirrel as a "secret image" meaningfully enhances my security.

It's not even proof against MITM attacks, which are the only thing it's supposed to prevent!

Re: The Correct Way to Validate Email Addresses

#307
post #61

Earlier quoted context omitted.

Caring what characters are in the password heavily implies that the site is not hashing the plaintext password in any way, and scarier still, may just be storing the plaintext password as plain text. Why: Because if they were (at least) hashing it the output from the hash would be a binary string in which case they would have to be 8-bit clean through to the DB column where the hash output resided, and then there wou…

> Caring what characters are in the password heavily implies that the site is not hashing the plaintext password in any way, and scarier still, may just be storing the plaintext password as plain text. I don't think that is true at all. I may very well want to put a few simple rules I validate serverside, such as 1) No username in password 2) No email in password 3) No list of 100 most common passwords in password Al…

Can you reassure me about the worst horror I've seen?

That is: a listed-and-enforced ban on obscenities in passwords. Is there any world in which that company isn't butchering their security in some serious way? (It's Time Warner, so not a small-time deal here).

Re: The Correct Way to Validate Email Addresses

#308

Earlier quoted context omitted.

> At no time is the plain text password stored anywhere Hopefully. When I see rules limiting passwords to 16 characters and disallowing SQL special characters, I'm having doubts.

My bank limits passwords at 15 characters. The best thing? There is no verification, it just cuts off. Have fun figuring out why you can not login anymore.

My bank limits passwords to ten chars. Ten!

Have you ever heard any reasoning behind why they do this? The "best" excuse I've heard is so that customers don't forget. As if they don't have a "Forgot password?" link right there.

Re: The Correct Way to Validate Email Addresses

#309

Earlier quoted context omitted.

No it doesn't. You can perform the first pass of salted hashing on the client-side. This should not harm security, but it can improve it if someone on the datapath is logging requests but does not alter them.

Isn't that what SSL does? And if the SSL between you and the destination is compromised, you don't even know if the hashing algorithm you asked the client to use is actually the one they used.

Yep. And importantly, SSL is securing more than just the password - if you just salt + hash client side, then anyone watching gets to do a replay on that value instead of the original.

Re: The Correct Way to Validate Email Addresses

#310

Earlier quoted context omitted.

> At no time is the plain text password stored anywhere Hopefully. When I see rules limiting passwords to 16 characters and disallowing SQL special characters, I'm having doubts.

My bank limits passwords at 15 characters. The best thing? There is no verification, it just cuts off. Have fun figuring out why you can not login anymore.

Comcast has the same issue. I changed the password for a user on my account using a password manager, it accepted a 20 character password with no errors, but then I was unable to login with that account. Changing to a 12 character password finally worked.
Post reply on HN