Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94873 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69393 invoked from network); 6 Aug 2016 04:37:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2016 04:37:35 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:42441] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/C3-33134-C8965A75 for ; Sat, 06 Aug 2016 00:37:34 -0400 Received: (qmail 57066 invoked by uid 89); 6 Aug 2016 04:37:29 -0000 Received: from unknown (HELO mail-qk0-f175.google.com) (yohgaki@ohgaki.net@209.85.220.175) by 0 with ESMTPA; 6 Aug 2016 04:37:29 -0000 Received: by mail-qk0-f175.google.com with SMTP id x185so87947168qkc.2 for ; Fri, 05 Aug 2016 21:37:29 -0700 (PDT) X-Gm-Message-State: AEkoouvRfBnAGpNEo/63OsD2egh9a1cAfn8lTdgZe3qP5CpRTg5ffy0kUxBrsQsSTRxMcM9qlIrc7GkzJ3heXA== X-Received: by 10.55.39.81 with SMTP id n78mr16915566qkn.10.1470458243603; Fri, 05 Aug 2016 21:37:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.85.242 with HTTP; Fri, 5 Aug 2016 21:36:43 -0700 (PDT) In-Reply-To: References: Date: Sat, 6 Aug 2016 13:36:43 +0900 X-Gmail-Original-Message-ID: Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [RFC][DISCUSSION] Add validation functions to filter From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi all, On Fri, Aug 5, 2016 at 3:10 PM, Yasuo Ohgaki wrote: > > https://wiki.php.net/rfc/add_validate_functions_to_filter > > ToDo > - Rename function in PR > - Add flag for allowing TAB in string > - Use php_error_docref() for usage mistakes > - Finish filter_check_definition implementation() > - Add API that retrieves array key name that raises exception. https://wiki.php.net/rfc/add_validate_functions_to_filter ToDo is done and RFC is updated. Additionally, I changed followings. - Removed trim from int/float/bool validation filter when they are used with filter_require_*() - Changed string filter's default. min_bytes=2, max_bytes=20. Larger range open larger window to attackers. - Renamed FILTER_FLAG_STRING_MULTI_LINE to FILTER_FLAG_ALLOW_NEWLINE. I wouldn't update PR unless I have to. Please review code and comment! https://github.com/php/php-src/pull/2048 (exif/stream tests are failing but it should be irrelevant to this patch) If you find issues, please let me know. Thank you! -- Yasuo Ohgaki yohgaki@ohgaki.net