Re: [RFC][DISCUSSION] Add validation functions to filter
| From: | Yasuo Ohgaki | Date: | Sat, 06 Aug 2016 04:36:43 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Add validation functions to filter | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94873@lists.php.net to get a copy of this message | ||
Hi all,
On Fri, Aug 5, 2016 at 3:10 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> 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