On 04/07/2010 12:30 PM, Justin Dearing wrote: > Ramus, > > On Tue, Apr 6, 2010 at 1:34 PM, Rasmus Lerdorf <ras...@lerdorf.com > <mailto:ras...@lerdorf.com>> wrote: > > Here is a straightforward (but not easy) one: > > http://bugs.php.net/bug.php?id=47435 > > I actually found it easy, slightly tedious, and not straightforward. I > guess its perspective. > > I am CCing my former colleague Mike G who added is $.02 to the ticket at > my request. > > I have submitted a patch that includes tests after Valli's suggestion. I > have to add the IPv4 mapping code, and will do that tonight. If you > could provide feedback on the rest I would appreciate it. > > Below are two proposals that I think belong in separate tickets. I will > open these two tickets unless they are summarily rejected by Ramus. > > Valli's notes implied that FILTER_VALIDATE_IP should match CIDR netmask > notations. eg 0.0.0.0/0 <http://0.0.0.0/0> and ::1/128 should match. > They do not. I propose a new flag called > FILTER_FLAG_INCLUDE_CIDR_NETMASK that does match. > > I second Mike G's proposed additional "FILTER_FLAG_NO_SPECIAL_RANGE" > that captures the union of the other sets as a convenient shortcut.
I'm ok with these. Like you say, this stuff is a bit tedious to sort through, and anything we can do to make it easier on users is a good thing. I'm trying to get the filter extension beefed up in the next version of PHP so people will gravitate towards it as an easy to use built-in mechanism as opposed to rolling their own over and over. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php