Ramus, On Tue, Apr 6, 2010 at 1:34 PM, Rasmus Lerdorf <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 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. Justin