#34214 [Bgs->Opn]: base64_decode does not properly ignore whitespace
| From: | dev at worldlinked dot net | Date: | Tue, 23 Aug 2005 21:00:02 +0000 |
| Subject: | #34214 [Bgs->Opn]: base64_decode does not properly ignore whitespace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83911@lists.php.net to get a copy of this message | ||
ID: 34214
User updated by: dev at worldlinked dot net
Reported By: dev at worldlinked dot net
-Status: Bogus
+Status: Open
Bug Type: *Mail Related
Operating System: all
PHP Version: 5.0.4
New Comment:
Hmm, Im pretty sure it still fails. We tried it also with 4.4.0. I did
notice though that if you cut and paste the phps file that the spaces do
not appear in $enctext in the first line. Perhaps you can try again and
manually put spaces at the beginning of each line, or you can download a
tgz of the php file here:
http://www.worldlinked.net/blog/files/testbase64.tgz
Previous Comments:
------------------------------------------------------------------------
[2005-08-23 02:19:50] sniper@php.net
Works fine with using PHP 4.4.0, PHP 5.1-dev, PHP 6.0-dev..
There's something really wrong either with your script or the machine
running the script.
------------------------------------------------------------------------
[2005-08-23 00:08:48] dev at worldlinked dot net
This bug was first reported in
http://bugs.php.net/bug.php?id=1596
however the patch listed there was either never applied or does not
work.
------------------------------------------------------------------------
[2005-08-22 23:39:49] dev at worldlinked dot net
Description:
------------
RFC 2045 says:
"All line breaks or other characters not found in Table 1 must be
ignored by decoding software."
However if a caracter such as a space is in the encoded data (which
some encoders such as newegg.com do) then the base64_decode does not
work.
Reproduce code:
---------------
http://www.worldlinked.net/blog/files/testbase64.php
or
http://www.worldlinked.net/blog/files/testbase64.phps
Expected result:
----------------
Hello, There seems to be a problem with php's base64_decode() function.
Whitespace needs to be trimmed from the email before it will properly
decode.
Actual result:
--------------
Hello, There seems to be a problem with php's base64_decode() function.
Whitespace needs to be trimmed from the
emù
¥°½É¥ÐÝ¥±°ÁɽÁɱ佸
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34214&edit=1