Bug #79213 [NEW]: mb_check_encoding doesn't work with base64
| From: | info at ioweb dot gr | Date: | Sun, 02 Feb 2020 21:54:05 +0000 |
| Subject: | Bug #79213 [NEW]: mb_check_encoding doesn't work with base64 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-225308@lists.php.net to get a copy of this message | ||
From: info at ioweb dot gr
Operating system: Debian 9, Ubuntu 18.04
PHP version: 7.2.27
Package: Unknown/Other Function
Bug Type: Bug
Bug description:mb_check_encoding doesn't work with base64
Description:
------------
mb_check_encoding is unable to detect strings that are encoded with
base64, it will show false
Example string "test" will yield "dGVzdA=="
but mb_check_encoding fails to detect correctly this is a base64 encoded
string
Test script:
---------------
$base64encoded = base64_encode("test");
$valid = mb_check_encoding($base64encoded, "BASE64");
Expected result:
----------------
$valid is true
Actual result:
--------------
$valid is false
--
Edit bug report at https://bugs.php.net/bug.php?id=79213&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79213&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79213&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79213&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79213&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79213&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79213&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79213&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79213&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79213&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79213&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79213&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79213&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79213&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79213&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79213&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79213&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79213&r=mysqlcfg