Bug #68842 [Asn->Csd]: mb_check_encoding() behavior does not check all HTTP inputs
| From: | phpdocbot@php.net | Date: | Fri, 07 Feb 2020 06:07:52 +0000 |
| Subject: | Bug #68842 [Asn->Csd]: mb_check_encoding() behavior does not check all HTTP inputs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225407@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68842&edit=1
ID: 68842
Updated by: phpdocbot@php.net
Reported by: yohgaki@php.net
Summary: mb_check_encoding() behavior does not check all HTTP
inputs
-Status: Assigned
+Status: Closed
Type: Bug
Package: mbstring related
Operating System: Irerelevant
PHP Version: Irrelevant
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=456e9a04a667359e22e0f68e8dd3b41d3e0993ef
Log: Fix bug #68842 mb_check_encoding() behavior does not match document
Previous Comments:
------------------------------------------------------------------------
[2015-12-19 23:23:08] yohgaki@php.net
Rather than change old doc. It's better to change mb_check_encoding() behavior to documented
way.
------------------------------------------------------------------------
[2015-12-18 10:02:08] yohgaki@php.net
Automatic comment from SVN on behalf of yohgaki
Revision: http://svn.php.net/viewvc/?view=revision&revision=338292
Log: Fix bug #68842 mb_check_encoding() behavior does not match document
------------------------------------------------------------------------
[2015-01-16 02:36:41] yohgaki@php.net
Description:
------------
http://php.net/mb_check_encoding
says,
var
The byte stream to check. If it is omitted, this function checks all the input from the beginning of
the request.
This description is misleading. What mbstring does is
Return TRUE if all conversions since the execution of the script has no problems at all. Return
FALSE if there is any conversion errors in mbstring operations.
If input encoding conversion is done, all inputs (GPC) are converted from mbstring.http_input
encoding to mbstring.internal_encoding. If input encoding conversion is not done, it cannot be used
for input encoding checks.
I think it's better to check GET/POST/COOKIE encodings, but it was made this way since the
introduction, I guess. (I think 1st param was not optional at first, but I don't remember
well.)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68842&edit=1