Bug #79237 [NEW]: filter_var limited to 8192 characters in input string
From: murray at focus-computing dot com dot au
Operating system: Debian 4.19.67-2+deb10u1 (2019-0
PHP version: 7.3Git-2020-02-07 (Git)
Package: *Regular Expressions
Bug Type: Bug
Bug description:filter_var limited to 8192 characters in input string
Description:
------------
I was testing some input being passed via a parameter to my script. I
was getting an error indicating that the value passed was invalid, yet
it didn't contain any of the strings I was searching for.
I went through the process of shortening the string and when I got below
8192 chars in length it worked, over 8192 chars in length it would
fail.
I also tried this on PHP v7.1.32 and the exact same code on my Mac OSX
which worked correctly.
Test script:
---------------
filter_var(trim($_REQUEST['parms']), FILTER_VALIDATE_REGEXP,
array("options" => array("regexp" => "/^((?!union select|union
all|\'A=|select char).)*$/im")));
Expected result:
----------------
A) filter_var should handle strings longer than 8192 chars
OR
B) Add documentation to filter_var manual entry indicating maximum
length of string.
--
Edit bug report at https://bugs.php.net/bug.php?id=79237&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79237&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79237&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79237&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79237&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79237&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79237&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79237&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79237&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79237&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79237&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79237&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79237&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79237&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79237&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79237&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79237&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79237&r=mysqlcfg
Thread (4 messages)
- murray at focus-computing dot com dot au