Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47828 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74748 invoked from network); 7 Apr 2010 19:40:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2010 19:40:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.222.191 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.222.191 mail-pz0-f191.google.com Received: from [209.85.222.191] ([209.85.222.191:54737] helo=mail-pz0-f191.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/6F-20534-E8FDCBB4 for ; Wed, 07 Apr 2010 15:39:59 -0400 Received: by pzk29 with SMTP id 29so1317977pzk.29 for ; Wed, 07 Apr 2010 12:39:55 -0700 (PDT) Received: by 10.141.214.6 with SMTP id r6mr8050782rvq.138.1270669195672; Wed, 07 Apr 2010 12:39:55 -0700 (PDT) Received: from [192.168.200.22] (c-98-234-184-167.hsd1.ca.comcast.net [98.234.184.167]) by mx.google.com with ESMTPS id g14sm3213787rvb.11.2010.04.07.12.39.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Apr 2010 12:39:54 -0700 (PDT) Message-ID: <4BBCDF86.4070701@lerdorf.com> Date: Wed, 07 Apr 2010 12:39:50 -0700 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10pre) Gecko/20100407 Shredder/3.0.5pre MIME-Version: 1.0 To: Justin Dearing CC: Michael Graziano , valli@icsurselva.ch, internals@lists.php.net References: In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Bug 47435[Was]: Re: [PHP-DEV] What gruntwork needs to be done From: rasmus@lerdorf.com (Rasmus Lerdorf) On 04/07/2010 12:30 PM, Justin Dearing wrote: > Ramus, > > On Tue, Apr 6, 2010 at 1:34 PM, Rasmus Lerdorf > 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. 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