mirror of
https://github.com/php/php-src.git
synced 2026-04-17 04:51:03 +02:00
Merge branch 'PHP-7.3'
* PHP-7.3: Fix #60494: iconv_mime_decode does ignore special characters
This commit is contained in:
@@ -1534,7 +1534,10 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
|
||||
break;
|
||||
|
||||
default: /* first letter of a non-encoded word */
|
||||
_php_iconv_appendc(pretval, *p1, cd_pl);
|
||||
err = _php_iconv_appendc(pretval, *p1, cd_pl);
|
||||
if (err != PHP_ICONV_ERR_SUCCESS) {
|
||||
goto out;
|
||||
}
|
||||
encoded_word = NULL;
|
||||
if ((mode & PHP_ICONV_MIME_DECODE_STRICT)) {
|
||||
scan_stat = 12;
|
||||
|
||||
23
ext/iconv/tests/bug60494.phpt
Normal file
23
ext/iconv/tests/bug60494.phpt
Normal file
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #60494 (iconv_mime_decode does ignore special characters)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(iconv_mime_decode('ä'));
|
||||
var_dump(iconv_mime_decode('ö'));
|
||||
var_dump(iconv_mime_decode('ß'));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
|
||||
bool(false)
|
||||
===DONE===
|
||||
Reference in New Issue
Block a user