Edit report at https://bugs.php.net/bug.php?id=80870&edit=1
ID: 80870
Comment by: a at b dot c dot de
Reported by: bugs at jth dot net
Summary: base64_decode: Support a "stream" of multiple
encoded strings
Status: Open
Type: Feature/Change Request
Package: Strings related
Operating System: Linux
PHP Version: 7.4.16
Block user comment: N
Private report: N
New Comment:
What if the first block isn't padded with '=' because the data it's encoding is
a multiple of three bytes in length?
$s1 = base64_encode("Line nr 1 bcdefgh\n");
$s2 = base64_encode("Line nr 2 \n");
$str = $s1."\n".$s2;
echo $str;
echo base64_decode($str);
Previous Comments:
------------------------------------------------------------------------
[2021-04-13 15:08:57] bugs at jth dot net
I just uploaded a patch as well as a test script (for 8.0.3)
There should be no change in the old behaviour for single base64 blocks.
------------------------------------------------------------------------
[2021-04-13 15:03:44] bugs at jth dot net
The following patch has been added/updated:
Patch Name: base64_encode_testscript
Revision: 1618326224
URL: https://bugs.php.net/patch-display.php?bug=80870&patch=base64_encode_testscript&revision=1618326224
------------------------------------------------------------------------
[2021-04-13 14:55:38] bugs at jth dot net
The following patch has been added/updated:
Patch Name: base64_patch
Revision: 1618325738
URL: https://bugs.php.net/patch-display.php?bug=80870&patch=base64_patch&revision=1618325738
------------------------------------------------------------------------
[2021-03-17 20:50:20] bugs at jth dot net
I may agree, but I am relating to a world outside my control, not an ideal world.
------------------------------------------------------------------------
[2021-03-17 20:34:20] rtrtrtrtrt at dfdfdfdf dot dfd
argue whatever you want: "Concatenated base64 blocks" are idiotic
------------------------------------------------------------------------
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=80870
--
Edit this bug report at https://bugs.php.net/bug.php?id=80870&edit=1