Bug #77726 [PATCH]: PCRE2 does not support NULs in patterns
| From: | tobil4sk@outlook.com | Date: | Mon, 21 Feb 2022 11:16:23 +0000 |
| Subject: | Bug #77726 [PATCH]: PCRE2 does not support NULs in patterns | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-239919@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77726&edit=1
ID: 77726
Patch added by: tobil4sk@outlook.com
Reported by: 605036592 at qq dot com
Summary: PCRE2 does not support NULs in patterns
Status: Open
Type: Bug
Package: PCRE related
Operating System: CentOS-7.4-x86_64
PHP Version: 7.2.16
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Fix #77726: Allow null character in regex patterns
On GitHub: https://github.com/php/php-src/pull/8114
Patch: https://github.com/php/php-src/pull/8114.patch
Previous Comments:
------------------------------------------------------------------------
[2022-02-17 22:30:36] tobil4sk at outlook dot com
PR to address this bug:
https://github.com/php/php-src/pull/8114
------------------------------------------------------------------------
[2021-02-18 02:18:03] antonino dot spampinato86 at gmail dot com
Null pattern nice job https://3v4l.org/LluRm
------------------------------------------------------------------------
[2020-10-27 15:19:48] cmb@php.net
> I assume the restriction is purely technical, [â¦]
It seems so. Some code in pcre_get_compiled_regex_cache_ex() is
not binary safe (i.e. it assumes that a NUL byte terminates the
pattern), and there may be further modifications needed to
php_pcre.c.
------------------------------------------------------------------------
[2019-03-13 04:19:41] requinix@php.net
I assume the restriction is purely technical, so if we can lift it with PCRE2 then that's
probably the right answer.
------------------------------------------------------------------------
[2019-03-13 04:16:13] 605036592 at qq dot com
hello cmb@php.net, I think "/a".chr(0)."bc/" != '/a\\0bc/', so not the
same question!
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=77726
--
Edit this bug report at https://bugs.php.net/bug.php?id=77726&edit=1