|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35116 base64_decode broken in PHP 4.4.1
Submitted: 2005-11-05 19:28 UTC Modified: 2005-11-05 20:53 UTC
From: Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.4.1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2005-11-05 19:28 UTC]
While base64_decode works properly in PHP 4.4.0 and PHP 5, it fails in PHP 4.4.1.  I can reproduce this problem with vanilla sources of PHP 4.4.1 with the following ./configure line:

./configure --disable-all --with-mcrypt --enable-cli

I'm using Linux with glibc 2.3.5 and GCC 4.0.3.

Reproduce code:
echo base64_decode("Hello World");

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-05 20:00 UTC]
I understand that whitespaces are not supported in Base64, but still the behaviour of base64_decode() should not change from 4.4.0 to 4.4.1.
 [2005-11-05 20:01 UTC]
Why can't a bug be fixed?
 [2005-11-05 20:04 UTC]
I'm not questioning that a bug shouldn't be fixed.  What I'm questioning is if this should happen within minor releases *if* the fix imposes a BC break.
 [2005-11-05 20:53 UTC]
Thinking about it again, I don't consider the change a BC break anymore.  Clearly PHP's implementation of Base64 was incorrect prior to fixing #34214 and thus people like me, who passed input containing whitespace to base64_decode(), were doing something wrong in first place.

Still it was surprising to see an application stop working when deploying a security release of PHP, but such is live I guess.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 17:01:30 2024 UTC