Christoph M. Becker
2b700841c5
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Adapt test cases for Oniguruma 6.9.4
2019-11-29 17:00:11 +01:00
Christoph M. Becker
c55d09c2f5
Adapt test cases for Oniguruma 6.9.4
...
Apparently, bug 78633 has now really been fixed; the former fix only
catered to the buffer overflow, but yielded a wrong result. Also,
the order of the named captures has been fixed.
2019-11-29 16:59:19 +01:00
Stanislav Malyshev
d517c559fc
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78633 : Heap buffer overflow (read) in mb_eregi
2019-10-20 23:20:16 -07:00
Christoph M. Becker
4f50d58cab
Fix #78633 : Heap buffer overflow (read) in mb_eregi
...
We backport kkos/oniguruma@15c4228aa2 .
2019-10-20 22:47:38 -07:00
Nikita Popov
5b067163be
Limit retry_limit test to oniguruma >= 6.9.3
...
This test is somewhat fragile in that it depends on how well a
particular regex is optimized. Apparently on 6.9.1 this regex
would hit the default retry_limit of 1000000 already. I'm limiting
this to 6.9.3 because that's the version that works for me.
2019-10-07 10:49:34 +02:00
Nikita Popov
6623e7ac51
Add support for mbstring.regex_retry_limit
...
This is very similar to the existing mbstring.regex_stack_limit,
but for backtracking. The default value matches pcre.backtrack_limit.
Only used on libonig >= 2.8.0.
2019-10-06 10:06:33 +02:00
Christoph M. Becker
3d89f92784
Skip tests for old versions instead of marking them XFAIL
...
According to commit 0eea9a6[1], these tests fail with old Oniguruma
versions; we are not sure which version of Oniguruma is required to let
them pass, but at least 6.9.3 is sufficient.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=0eea9a642941ab5d4c612f8092f186977afbb73e >
2019-09-30 14:14:23 +02:00
Christoph M. Becker
70f367d48a
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78609 : mb_check_encoding() no longer supports stringable objects
2019-09-30 13:06:57 +02:00
Christoph M. Becker
2046b3ce4f
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78609 : mb_check_encoding() no longer supports stringable objects
2019-09-30 13:04:54 +02:00
Christoph M. Becker
45db6fa567
Fix #78609 : mb_check_encoding() no longer supports stringable objects
...
We apply type juggling for other types than array.
2019-09-30 12:42:04 +02:00
Stanislav Malyshev
e7befd38d4
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78559 : Heap buffer overflow in mb_eregi
2019-09-23 21:51:12 -07:00
Christoph M. Becker
8f949eba80
Fix #78559 : Heap buffer overflow in mb_eregi
...
We backport kkos/oniguruma@d3e402928b .
2019-09-23 21:49:55 -07:00
Fabien Villepinte
db4f5e44e1
Add missing SKIPIF (mbstring)
2019-09-04 08:51:03 +02:00
Nikita Popov
39e756e7fe
Deprecate encoding as 3rd param to mb_strrpos()
2019-07-22 11:39:52 +02:00
Nikita Popov
487d4d07b4
Remove some uses of deprecated internal_encoding settings in tests
2019-04-17 14:24:11 +02:00
Nikita Popov
f73f190c3f
Fix internal_encoding fallback in mbstring
...
By introducing a hook that is called whenever one of
internal_encoding / input_encoding / output_encoding changes, so
that mbstring can adjust it's internal state.
This also makes internal_encoding work with zend multibyte.
2019-04-17 14:05:53 +02:00
Nikita Popov
1ef5b79b6b
Merge branch 'PHP-7.3' into PHP-7.4
2019-04-12 10:37:17 +02:00
Nikita Popov
354a1c27aa
Merge branch 'PHP-7.2' into PHP-7.3
2019-04-12 10:37:08 +02:00
Nikita Popov
3b53d28e60
Fix key leaks in mb_convert_encoding()
2019-04-12 10:36:58 +02:00
Stanislav Malyshev
0eea9a6429
Unfortunately, travis CI has old oniguruma library
...
So we can't test it there.
2019-04-01 00:30:56 -07:00
Stanislav Malyshev
077ce33aa9
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Update NEWS & UPGRADING
Add fallbacks for older oniguruma versions
Add mbstring.regex_stack_limit to php.ini-*
Implement RF bug #72777 - ensure stack limits on mbstring functions.
2019-04-01 00:05:36 -07:00
Stanislav Malyshev
bc8f292c05
Merge branch 'mb-limit-73' into PHP-7.3
...
* mb-limit-73:
Add fallbacks for older oniguruma versions
Add mbstring.regex_stack_limit to php.ini-*
Implement RF bug #72777 - ensure stack limits on mbstring functions.
2019-04-01 00:00:14 -07:00
Matteo Beccati
263c587854
Fixed SKIPIF when --disable-mbregex is used
2019-03-30 18:29:49 +01:00
Matteo Beccati
f030f34622
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed SKIPIF when --disable-mbregex is used
2019-03-30 18:29:44 +01:00
Matteo Beccati
0dbb581cf4
Fixed SKIPIF when --disable-mbregex is used
2019-03-30 18:28:33 +01:00
Matteo Beccati
16b40a1806
Fixed SKIPIF when --disable-mbregex is used
2019-03-29 14:09:39 +01:00
Stanislav Malyshev
66c35b083b
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Validate subject encoding in mb_split and mb_ereg_match
Validate pattern against mbregex encoding
SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws
2019-03-28 00:42:56 -07:00
Stanislav Malyshev
402adc1df1
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Validate subject encoding in mb_split and mb_ereg_match
Validate pattern against mbregex encoding
SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws
2019-03-28 00:35:22 -07:00
Yasuo Ohgaki
738016bd88
Implement RF bug #72777 - ensure stack limits on mbstring functions.
...
The patch creates new config: mbstring.regex_stack_limit, which
defaults to 100000.
2019-03-28 00:31:57 -07:00
Nikita Popov
0ecac37c40
Validate subject encoding in mb_split and mb_ereg_match
...
We were already validating the subject encoding in most functions,
but not these two.
2019-03-27 23:20:27 -07:00
Nikita Popov
40fe50daf6
Validate pattern against mbregex encoding
...
Oniguruma does not consistently perform this validation itself (at least
on older versions), so make sure we check pattern encoding validity on the
PHP side.
2019-03-27 23:19:46 -07:00
Fabien Villepinte
26dfce7f36
Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 22:55:30 +01:00
Gabriel Caruso
c67c2c4d8f
Fix tests filenames
2019-03-10 23:57:32 -03:00
Gabriel Caruso
e907fbaf7c
Remove unnecessary check for always available extension
2019-03-05 12:54:24 -03:00
Nikita Popov
7e3f4a2390
Remove more zpp error/variation tests
2019-03-05 14:09:33 +01:00
Nikita Popov
4bd18db8cc
Remove custom error handler in mbstring tests
...
To make it more obvious what is tested and what the error messages
are.
2019-03-05 11:41:53 +01:00
Nikita Popov
b26df0e395
Remove tests for zpp failure conditions
...
These tests only check zpp error conditions, so drop them per
zpp testing policy.
2019-03-05 10:22:23 +01:00
legale
d77ad27415
Implement mb_str_split()
...
RFC: https://wiki.php.net/rfc/mb_str_split
2019-02-12 16:42:51 +01:00
Jachim Coudenys
d8b2705d62
Test mb_str* functions for 'unknown encoding' warnings
2019-02-12 09:31:58 +01:00
Nikita Popov
e91d8ac5f6
Add MB_ONIGURUMA_VERSION and use it in a version dependent test
2019-02-11 14:53:19 +01:00
Nikita Popov
f5d2a30466
Validate subject encoding in mb_split and mb_ereg_match
...
We were already validating the subject encoding in most functions,
but not these two.
2019-02-11 12:31:59 +01:00
Nikita Popov
2e594265b8
Validate pattern against mbregex encoding
...
Oniguruma does not consistently perform this validation itself (at least
on older versions), so make sure we check pattern encoding validity on the
PHP side.
2019-02-11 12:10:40 +01:00
Nikita Popov
8bc663f43b
Remove zpp variation tests
2019-02-05 09:38:55 +01:00
Nikita Popov
e366ceebad
Deprecate mb_ereg_replace with non-string pattern
...
I'm counting this towards the non-string needle deprecation from
https://wiki.php.net/rfc/deprecations_php_7_3 . I wasn't aware that
mb_ereg_replace() is also affected by this issue. It's even more
ridiculous than usual here, because the integer is interpreted as
an ASCII codepoint, even though these are supposed to be multibyte
functions :(
2019-02-01 15:02:31 +01:00
Nikita Popov
5e4c6dec12
Merge branch 'PHP-7.3'
2019-01-24 15:14:09 +01:00
Nikita Popov
3c98c2d0cb
Fixed bug #77514
2019-01-24 15:13:49 +01:00
Nikita Popov
93a221ec4b
Merge branch 'PHP-7.3'
2019-01-14 10:24:11 +01:00
Nikita Popov
d6212835f2
Merge branch 'PHP-7.2' into PHP-7.3
2019-01-14 10:23:44 +01:00
Nikita Popov
3ad0ebdf5c
Fixed bug #77454
2019-01-14 10:22:48 +01:00
Nikita Popov
579c7d0412
Merge branch 'PHP-7.3'
2019-01-08 10:21:54 +01:00