News for hackers. Stuff that matters.
Re:Valid Email Addresses by digitalsushi on Friday November 30, 2012 @01:52PM (#4854766)
On the whole, it's probably not a loss. It's probably a gain. On the whole, they validated almost all of the email addresses. They spent their corner case money instead on making the product awesome, and instead of poor []:,;@\\\"!#$%&'*+-/=?^_`{}| ~ ? ^_`{}|~.a"@example.org getting a copy, everyone else got something better.
Re:Valid Email Addresses by baddox on Friday November 30, 2012 @02:19PM (#4854935)
I don't understand. Won't a correct-to-spec validation procedure take about as long to implement as an ad hoc procedure? I'm guessing a maximum of two developer-hours, and that's if you're extremely careful (i.e. unit tests).
Re:Valid Email Addresses by jrockway on Friday November 30, 2012 @02:40PM (#4855037)
I recently did this:

    def is_email_address(email):
         return '@' in email
LGTM.
Re:Valid Email Addresses by RandallBrown on Friday November 30, 2012 @02:50PM (#4855090)
ship it.

Seriously, the only way to validate an email is to send them an email and make them click a validation link. I

Re:Valid Email Addresses by gav on Friday November 30, 2012 @03:17PM (#4855219)
It's not the worst way, but it's far from being the best way.

Sometimes you don't want the user to stop what they are doing, wait for an email to arrive, hope it doesn't land in spam, read it, click then link, and then continue. This is usually the case if you want them to buy something.

Secondly, what happens when they don't get the email? We had lots of problems where people where signing up from the following domains: gmail.cm, gmail.co, gmail.con, tmail.com, gmail.oom, gamil.com, hotamail.com, homtail.com, etc.

You want to firstly do some simple checks to see if it looks roughly like an email address. I like to see if it matches \S+@\S+\.\S+ (and ignore the few people with a top-level domain). Then you want to validate the actual domain to see if it's a misspelling of a popular address.

Re:Valid Email Addresses by fayden on Friday November 30, 2012 @02:16PM (#4854916)
Why not use a librairy that validates emails? You save time, and you actually accept valid emails.

I agree that the example with a lot of symbols is over the top, but when a website doesn't accept [email protected], I assume the product will be sub-par quality wise. The author did not follow of rigorous process for something as simple as email validation, I doubt he'll be more rigorous in other parts of his project.

Re:Valid Email Addresses by pyre on Friday November 30, 2012 @02:47PM (#4855075)
There are other concerns too. I submitted a bug report to Zappos because their emailer did not URL-escape '+' in [email protected]. Resulting in:

  http://www.zappos.com/[email protected]
which was treated as:

  http://www.zappos.com/?email=foo%[email protected]
by the browser. It worked fine when I manually encoded the '+'.
Re:Valid Email Addresses by michaelhoffman on Friday November 30, 2012 @03:07PM (#4855169)
I've given up on using + addresses. As other people have pointed out, the worst thing about them is that sometimes you will find that it works initially but will break other parts of the application now or later. For example, account creation works fine, but in two years, you can no longer log in.