[CLUE-Admin] [Fwd: CLUE Web Site Contact Form - Linux, Clue
GUI, et al. (Thu Oct 24 2002 12:20 pm)]
Lynn Danielson
lynn.danielson at clue.denver.co.us
Thu Oct 24 19:31:03 MDT 2002
On Thu, 2002-10-24 at 16:00, David Anselmi wrote:
> Sigh. It's true, our contact form validation is naive. Here's the
> regex it uses:
>
> ereg( '^[A-Za-z0-9._]+\@[A-Za-z0-9_-]+\.[A-Za-z]+$', $from )
>
> which fails if there are more than 2 domain name parts. It also fails
> the cases listed here:
>
> http://catless.ncl.ac.uk/Risks/22.13.html#subj17
>
> Don't know how soon I'll have time to fix it since I'm not up on php regexs.
PHP can support perl regex. So, you should be able to do something
like:
preg_match( '^[A-Za-z0-9._]+\@(?=[A-Za-z0-9_-]+\.)+[A-Za-z]+$', $from )
A straight forward back reference should work as well, it would just
be less efficient:
ereg( '^[A-Za-z0-9._]+\@([A-Za-z0-9_-]+\.)+[A-Za-z]+$', $from )
This should match Bob Brown's case and other addresses with multiple
domain levels. Why is the URL an issue? Does it fail the web page
check?
> At least he liked Jeff's talk. The Linux history link below looks
> interesting, too.
Sounds like this event went well. At least one spectator liked it.
I'd be interested in hearing more about the event. I suspect there
would be others on clue-talk who'd be interested as well. Care to
share? :-)
Bob's ap headline was topical. It's a positive follow up to the
the article John Kottal mentioned on clue-talk.
Lynn
> -------- Original Message --------
> Subject: CLUE Web Site Contact Form - Linux, Clue GUI, et al. (Thu Oct
> 24 2002 12:20 pm)
> Date: Thu, 24 Oct 2002 12:20:18 -0600
> From: Robert.L.Brown at clue.denver.co.us, II <tjhbob at ExCite.com>
> To: webmaster at clue.denver.co.us
>
> Your eMAIL address checker rfejected "bbrown at co.hartic.com" as my
> eMAIOL address, but it really is try it, it works.! I was at the ITEC
> conference/seminar yesterday and attended "TUX in a Suit". Being unsure
> of what to expaect I was very much rewarded with a pleasant surprise and
> enlightening presentation. Today while talking toa sn associate, I
> mentioned your presentation. He subsequently sent me an email with
> http://ragib.hypermart.net/linux/
> as a site having a good history of Linux. In it I found a site talking
> about "Open Source Atttack". Going there,
> "http://www.go2net.com/headlines/ap/technology/1035481506_science_top.html",
> I found moer re: Linux that proved to be very inter3estin and I thought
> you might share my interest?
>
> Thanks again for opening my eyes, OS opinions, mind, ...
>
> BoB Brown
More information about the clue-admin
mailing list