| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
since PHP 7.
The only difference that was still left is that _ex checked whether
the type is the same first, but the usage of these macros did not
actually distinguish on whether such an inlined check is valuable
or not in a given context.
Also drop the unused convert_to_explicit_type macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:
> Returns the byte length of the matched string if a match for
> pattern was found in string, or FALSE if no matches were found
> or an error occurred.
>
> If the optional parameter regs was not passed or the length of
> the matched string is 0, this function returns 1.
Coupling this behavior to the $matches parameter doesn't make sense
-- we know the match length either way, there is no technical
reason to distinguish them. However, returning the match length
is not particularly useful either, especially due to the need to
convert 0-length into 1-length to satisfy "truthy" checks. We
could always return 1, which would kind of match the behavior of
preg_match() -- however, preg_match() actually returns the number
of matches, which is 0 or 1 for preg_match(), while false signals
an error. However, mb_ereg() returns false both for no match and
for an error. This would result in an odd 1|false return value.
The patch canonicalizes mb_ereg() to always return a boolean,
where true indicates a match and false indicates no match or error.
This also matches the behavior of the mb_ereg_match() and
mb_ereg_search() functions.
This fixes the default value integrity violation in PHP 8.
Closes GH-6331.
|
|
|
|
| |
Closes GH-5341
|
|
|
|
|
|
|
|
|
|
|
| |
Very interesting... it turns out that when Valgrind support was enabled,
`#include "config.h"` from within mbstring was actually including the file "config.h"
from Valgrind, and not the one from mbstring!!
This is because -I/usr/include/valgrind was added to the compiler invocation _before_
-Iext/mbstring/libmbfl.
Make sure we actually include the file which was intended.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- mbfl_buffer_converter_reset
- mbfl_buffer_converter_strncat
- mbfl_buffer_converter_getbuffer
- mbfl_oddlen
- mbfl_filter_output_pipe_flush
- mbfl_memory_device_output2
- mbfl_memory_device_output4
- mbfl_is_support_encoding
- mbfl_buffer_converter_feed2
- _php_mb_regex_globals_dtor
- mime_header_encoder_feed
- mime_header_decoder_feed
- mbfl_convert_filter_feed
|
|
|
|
| |
Closes GH-5598
|
|
|
|
| |
Closes GH-5758
|
|
|
|
| |
We also remove the mbregex ISO 8859 aliases with underscores.
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
We do not support the 'e' option anymore.
Merged together code which would emit an error if this option is present.
This also makes it clearer that the whole branch in the replacement section supporting this option is never hit, thus removed.
|
| |
| |
| |
| | |
Closes GH-5355
|
| |
| |
| |
| | |
Also why on earth would someone do this?
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Promotes only the warnings where the encoding comes only from a string.
Functions which accept an array of encodings will be fixed at a later stage.
Closes GH-5317
|
| |
| |
| |
| |
| | |
When setting new options, `mb_regex_set_options()` is supposed to
return the *previous* options.
|
| |
| |
| |
| |
| |
| | |
The beginning and ending of a Oniguruma Regex are stored in a OnigRegion (which is a typedef to the Oniguruma re_registers struct) as as int* therefore change the type from size_t to int
Closes GH-5196
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Reset MBREX(search_re) in RSHUTDOWN
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Reset MBREX(search_re) in RSHUTDOWN
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is going to cause a segfault if reused in the next request.
To illustrate the issue, run these two scripts in sequence with
the built-in server:
// script1.php
mb_ereg_search_init('foobar');
mb_ereg_search('foo');
// script2.php
var_dump(mb_ereg_search_init("foobar"));
var_dump(mb_ereg_search_pos());
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix use of mb_ereg_search_getregs() after invalid pattern
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix use of mb_ereg_search_getregs() after invalid pattern
|
| | |
| | |
| | |
| | |
| | | |
This segfaulted because we assumed that if there are matches,
there must be a regular expression as well.
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
| | | |
|
| | |
| | |
| | |
| | | |
Except for some bigger ones: reflection, sodium, spl
|
| | | |
|
| | | |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Closes GH-4732.
|
|\ \ \
| |/ / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* PHP-7.4:
Unfortunately, travis CI has old oniguruma library
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.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
* 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.
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 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.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The patch creates new config: mbstring.regex_stack_limit, which
defaults to 100000.
|
| | |\ \
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | | |
* 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
|
| | | |\
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* 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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were already validating the subject encoding in most functions,
but not these two.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|