Bug #79213 [PATCH]: mb_check_encoding doesn't return true with valid base64 strings

From: Date: Tue, 22 Aug 2023 10:09:57 +0000
Subject: Bug #79213 [PATCH]: mb_check_encoding doesn't return true with valid base64 strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245219@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79213&edit=1

 ID:                 79213
 Patch added by:     ady7788@yahoo.mail.com
 Reported by:        info at ioweb dot gr
 Summary:            mb_check_encoding doesn't return true with valid
                     base64 strings
 Status:             Verified
 Type:               Bug
 Package:            mbstring related
 Operating System:   Debian 9, Ubuntu 18.04
 PHP Version:        7.2.27
 Block user comment: N
 Private report:     N

 New Comment:

The following pull request has been associated:

Patch Name: Ignore externally managed and generated files
On GitHub:  https://github.com/php/web-windows/pull/21
Patch:      https://github.com/php/web-windows/pull/21.patch


Previous Comments:
------------------------------------------------------------------------
[2020-02-03 06:05:10] requinix@php.net

I suppose it could use another small update.

------------------------------------------------------------------------
[2020-02-03 05:27:21] info at ioweb dot gr

No problem. I just saw that the title of the bug changed and it's about padded strings while
it's failing for all base64 strings. A bit misleading

------------------------------------------------------------------------
[2020-02-03 05:18:05] requinix@php.net

@info: Yes, I was wrong about the nature of the bug, and the code I checked my response with also
happened to be wrong (and in a way that made it look like mb_check_encoding was working). You can
disregard most of what I said :(

------------------------------------------------------------------------
[2020-02-03 05:15:38] info at ioweb dot gr

I'd like to mention that For word "δοκιμή" the encoded string is
zrTOv866zrnOvM6u and the result is false as well. It's not the padded = signs only.

------------------------------------------------------------------------
[2020-02-02 22:50:06] requinix@php.net

Ah shoot, you're right. It's mb_detect_encoding that works on partial strings, not
mb_check_encoding.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=79213


--
Edit this bug report at https://bugs.php.net/bug.php?id=79213&edit=1


Thread (13 messages)

« previous php.bugs (#245219) next »