Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94826 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92563 invoked from network); 4 Aug 2016 10:11:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2016 10:11:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; 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:38198] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/15-53111-CD413A75 for ; Thu, 04 Aug 2016 06:11:43 -0400 Received: (qmail 62172 invoked by uid 89); 4 Aug 2016 10:11:37 -0000 Received: from unknown (HELO mail-qt0-f175.google.com) (yohgaki@ohgaki.net@209.85.216.175) by 0 with ESMTPA; 4 Aug 2016 10:11:37 -0000 Received: by mail-qt0-f175.google.com with SMTP id u25so156369690qtb.1 for ; Thu, 04 Aug 2016 03:11:36 -0700 (PDT) X-Gm-Message-State: AEkoouvuhSsx4NkyWDr1bxcv43PlxHplni4f0yfjyQz+tthJATdbK50rfHf3sSiIJ5w2BT1TpoBZiu4GXec9kA== X-Received: by 10.200.33.183 with SMTP id 52mr5187125qty.128.1470305491281; Thu, 04 Aug 2016 03:11:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.85.242 with HTTP; Thu, 4 Aug 2016 03:10:50 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Aug 2016 19:10:50 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Christian Stadler Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Adding validate_var_array()/validate_input_array() to which version? From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Christian and all, On Thu, Aug 4, 2016 at 10:07 AM, Christian Stadler wrote: > Am 01.08.2016 um 10:23 schrieb Yasuo Ohgaki: >> P.S. It's possible to return array that contains offending values. It >> is not included since users can store whole offending input array. >> Whole input is more useful for attack analysis. > > Actually I wanted to suggest exactly that for ppl. who want to give > Feedback to their users, what values failed to validate to the users. > Probably with a fourth optional param, like `$return_invalid = false`? > Of course logging is a different topic and should always use the whole > offending input array. I can set offending value to filter globals so that it can be retrieved later in catch block. I cannot return or modify referenced parameter because of raised exception. I don't mind adding this feature. It requires an API like validate_get_offending_value(). (The name should be nicer) How many of us are interested in this feature? Thank you for feedback! -- Yasuo Ohgaki yohgaki@ohgaki.net