Bug #72263 [Opn->Csd]: base64_decode skips a character after padding in strict mode
Edit report at https://bugs.php.net/bug.php?id=72263&edit=1
ID: 72263
Updated by: nikic@php.net
Reported by: lauri dot kentta at gmail dot com
Summary: base64_decode skips a character after padding in
strict mode
-Status: Open
+Status: Closed
Type: Bug
Package: Strings related
PHP Version: 7.0.6
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of lauri.kentta@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6d17ee744f52db2e6e598fd510dee8ba039480f2
Log: base64_decode: fix bug #72263 (skips char after padding)
Previous Comments:
------------------------------------------------------------------------
[2016-05-25 17:50:45] lauri dot kentta at gmail dot com
Description:
------------
base64_decode skips a character after padding in strict mode.
Test script:
---------------
<?php
var_dump(base64_decode("*", true));
var_dump(base64_decode("=*", true));
var_dump(base64_decode("VVV=", true));
var_dump(base64_decode("VVV=*", true));
Expected result:
----------------
bool(false)
bool(false)
string(2) "UU"
bool(false)
Actual result:
--------------
bool(false)
string(0) ""
string(2) "UU"
string(2) "UU"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72263&edit=1
Thread (2 messages)