Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Web-dev Digest, Vol 3, Issue 230



Hi Mark,

I agree with Scott, this is a problem you should fix pronto or you risk getting your domain RBL-ed and/or your ISP account blocked.

>Regarding cleaning the email, I am doing that... as least I think I
>am. Here's the cleaning routines:
> ...
>if (preg_match(' /[\r\n,;"]/ ', urldecode($_REQUEST['email']))
> ...

I think your are going about this the wrong way. Instead of looking for blacklisted characters i.e. \r, \n, etc. you should check for acceptable data and ban everything else. This is the proactive white list in contrast to reactive blacklist argument.

In practice, there are many regex out there that can identify a valid e-mail address. You may want to try one. There's a very good article on validating e-mail addresses here: http://www.regular-expressions.info/email.html

Good luck,

Richard.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.