php-src/ext/mbstring
pakutoma b721d0f71e Fix phpGH-10648: add check function pointer into mbfl_encoding
Previously, mbstring used the same logic for encoding validation as for
encoding conversion.

However, there are cases where we want to use different logic for validation
and conversion. For example, if a string ends up with missing input
required by the encoding, or if a character is input that is invalid
as an encoding but can be converted, the conversion should succeed and
the validation should fail.

To achieve this, a function pointer mb_check_fn has been added to
struct mbfl_encoding to implement the logic used for validation.
Also, added implementation of validation logic for UTF-7, UTF7-IMAP,
ISO-2022-JP and JIS.

(The same change has already been made to PHP 8.2 and 8.3; see
6fc8d014df. This commit is backporting the change to PHP 8.1.)
2023-03-25 09:52:10 +02:00
..
libmbfl Fix phpGH-10648: add check function pointer into mbfl_encoding 2023-03-25 09:52:10 +02:00
tests Fix phpGH-10648: add check function pointer into mbfl_encoding 2023-03-25 09:52:10 +02:00
ucgendat Combine control into one character group 2021-08-24 20:39:16 +02:00
common_codepoints.txt mb_detect_encoding recognizes all letters in Hungarian alphabet 2022-05-25 08:22:07 +02:00
config.m4 Remove duplicate implementation of CP932 from mbstring 2021-06-17 13:12:40 +02:00
config.w32 Remove duplicate implementation of CP932 from mbstring 2021-06-17 13:12:40 +02:00
CREDITS
gen_rare_cp_bitvec.php Improve detection accuracy of mb_detect_encoding 2021-10-19 18:05:51 +02:00
mb_gpc.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
mb_gpc.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
mbstring.c Fix phpGH-10648: add check function pointer into mbfl_encoding 2023-03-25 09:52:10 +02:00
mbstring.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
mbstring.stub.php Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
mbstring_arginfo.h Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
php_mbregex.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_mbregex.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_onig_compat.h
php_unicode.c Return bool from php_unicode_is_prop() 2021-08-24 19:21:21 +02:00
php_unicode.h Add comments to grouped character properties 2021-08-24 22:09:26 +02:00
rare_cp_bitvec.h mb_detect_encoding recognizes all letters in Hungarian alphabet 2022-05-25 08:22:07 +02:00
unicode_data.h Update Unicode tables to 14.0.0 2021-09-20 09:58:20 +02:00