Live data from Hacker News

How not to check the validity of an email address

dellsystem.me

111–120 of 243 posts

Re: How not to check the validity of an email address

#111
post #103

Earlier quoted context omitted.

Education software is literally the worst. Moodle was pretty ick to begin with, but you should've seen the state of one install I had to work on by the time I got to it. I still have nightmares.

Needs disrupting

It's extremely hard to break into because like healthcare these gigantic institutions where nobody can get fired made choices ten to twenty years ago that have now become "the way it's done" and they won't accept a better solution.

Re: How not to check the validity of an email address

#112
post #90

Earlier quoted context omitted.

As a history major, I would agree with you. One of the real issues has to do with the mentality of coding. There are people regardless of background who approach coding as a job, and those who approach it as a craft. You want the latter, not the former. Here's my rule: If you don't look back at code you wrote a decade ago with some degree of horror, you are either an extraordinarily good coder, or you aren't a good c…

A decade is a long time at a single job... Try six months for a good start :)

I look at stuff I wrote 3 months ago with horror.

Then again I started learning ios programming then so I might have a bias/reason for it. >.<

Re: How not to check the validity of an email address

#114

Earlier quoted context omitted.

If I recall correctly the code looked something like this: if (!admin()) echo " window.location = '/signin'; "; delete_bid($_GET['bid_id']); ?>

a simple 'else' would have at least stopped the deleting part :/

This could have been written in the mindset that JavaScript and PHP ran at the same time. Lots of people still believe that.

Re: How not to check the validity of an email address

#116

I'm sad to see so many smart people wasting their time discussing what some stupid person did. :( I'm also disappointed I lost a couple of minutes of my life reading about this stupidity as well... just because it got 233 points. So, I'm looking at YOU 233 who upvoted this. WHY DID YOU DO IT?

As expected. :)

Just click the downvote button on my comment. Don't bother to explain anything.

Oh, I know, you disapprove I called you smart. Sorry about that.

Re: How not to check the validity of an email address

#117
post #95
post #69

Earlier quoted context omitted.

Yes, I decided to ignore that constraint because it doesn't make sense :). The article suggests performing "server-side membership testing, which is O(1)", but I think this is a bit too much — you can do even easier server-side validation without the list of all valid e-mail addresses, just the information that "@[anything but these two domains] is not an OK target".

> Yes, I decided to ignore that constraint because it doesn't make sense :). Then the customer won't pay you because you ignored their requirements. They might even sue you because you breached contract. If the customer asks you for a mound of poo you write them a mountain of poo; you try your damned hardest to make sure that the room smells like poo when they are using the app. If they go home and tell their wife an…

Heh, yes, the smiley face there encodes something like of ", although of course I know that in the 'real world' people can't just ignore product requirements that don't make sense, and hopefully people will challenge at the design phase insane requirements like 'client-side validation of all possible e-mail addresses' rather than implementing them."

Re: How not to check the validity of an email address

#118

Man. Reading posts like these has several effects on me. One is utter shock that anyone could be so stupid. Another is to remind me of how little I know (because I'm sure in the eyes of someone who actually knows anything about security, I'd probably provoke the same reaction). I'm also amazed that some of the people responsible for these things can still find work. Here's my own personal story. The other day, I had…

Not necessarily. They may be using a reversible hash. Not much more secure, but it beats plaintext.

Yeah, maybe they just look up the MD5 hash on http://md5.gromweb.com/ and sent him the result.

I used that site to show my boss his plaintext password to explain why MD5 alone is barely more than security though obscurity when trying to convince him that we needed to salt them as well - he agreed with me on the spot.

Re: How not to check the validity of an email address

#119

In college I was hired to build an auction site. I was billing my client $20 / hour and subcontracting out the work to some of my fellow classmates at $10 / hour. I was swamped with other work and didn't have much time to review the code. I just made sure it satisfied the specifications and shipped it. We launched the site and did a few hundred thousands dollars worth of transactions in the first 24 hours. Then somet…

The first time someone wanted to hire me was even before I started college. "so how much will you bill me?" "Well right now I get 7€ (9.2$ at current rate) for unloding trucks ..." He interupted me before I could finish the sentence and demand 8€. "I can not pay you 7€! taht is just to much!"

Sooooo I declined but someone took the job ... for under 8$ an hour.

How much quality can you expect for that price???

Re: How not to check the validity of an email address

#120
post #55

Somewhat unrelated, but out of curiosity, does anyone know of a site that lists — for all popular languages — various libraries/code snippets/routines which one can use to correctly (according to the RFCs) check the validity of e-mail addresses? If not I may be compelled to create one.

@"^[^@]{1,}[@]{1}[^@]{1,}\.{1}[^@]{1,}$"

I check it with this RegEx to make sure it's in the right format of [string]@[string].[string] to make sure that user at least tries to enter an email address, but beyond that sending and email and getting a response is the only way.

Post reply on HN