Re: [RFC][DISCUSSION] Add validation functions to filter
| From: | Yasuo Ohgaki | Date: | Wed, 03 Aug 2016 21:13:19 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Add validation functions to filter | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94817@lists.php.net to get a copy of this message | ||
Hi all,
Patch for this RFC is update
https://github.com/php/php-src/pull/2048
- Added filter_check_definition() - Check definition array for
validate_*_array() and filter_*_array(). These functions ignores error
silently and this behavior could result in serious security issue. We
should provide this function at least.
- Made to require filter definitions for validate_() functions.
RFC is updated accordingly.
https://wiki.php.net/rfc/add_validate_functions_to_filter
There is suggestion to use "CTRL".
I used CNTRL for control char, since POSIX iscntrl() exists.
We have ctype_cntrl(), IntlChar::iscntrl()
If shorter constant name is preferred, I don't mind at all.
FILTER_FLAG_STRING_ALLOW_CNTRL
↓
FILTER_FLAG_STRING_ALLOW_CTRL
Any comments?
Regard,
--
Yasuo Ohgaki
yohgaki@ohgaki.net