php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69079 enhancement for mb_substitute_character
Submitted: 2015-02-19 11:44 UTC Modified: 2017-01-04 06:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: masakielastic at gmail dot com Assigned: yohgaki (profile)
Status: Closed Package: mbstring related
PHP Version: 5.6.5 OS:
Private report: No CVE-ID: None
 [2015-02-19 11:44 UTC] masakielastic at gmail dot com
Description:
------------
It is not enough to check the range of argument of mb_substitute_character.
Consider UTF-8. For example, 0x1F600 (GRINNING FACE) is rejected.
0xD800 is accepted despite of high surrogate.

Test script:
---------------
var_dump(
    mb_substitute_character(0x1F600),
    mb_substitute_character(0xD800)
);

Expected result:
----------------
bool(true)
bool(false)

Actual result:
--------------
bool(false)
bool(true)

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-27 05:09 UTC] yohgaki@php.net
-Assigned To: +Assigned To: yohgaki
 [2017-01-04 06:59 UTC] krakjoe@php.net
-Status: Assigned +Status: Closed
 [2017-01-04 06:59 UTC] krakjoe@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC