ID: 45149
User updated by: frode dot langvik at exense dot com
Reported By: frode dot langvik at exense dot com
Status: Open
Bug Type: Strings related
Operating System: Windows XP
PHP Version: 5.2.6
New Comment:
I wrote version 5.2.5 in the text, but I meant version 5.2.6. Sorry for
the inconvenience.
Previous Comments:
------------------------------------------------------------------------
[2008-06-02 14:19:06] frode dot langvik at exense dot com
Description:
------------
When sending parameters in an url, the way of handling plus signs have
changed. In PHP 4.3.9 everything worked fine, but after upgrading to
version 5.2.6 it fails. In the test case will function base64_encode()
generate a plus sign in both php version 4.3.9 and 5.2.5, but in version
5.2.5 it seems that the url is broken and base64_decode() got wrong
value to work with. The test case includes some norwegian characters,
but I have also discovered it when using other characters.
Reproduce code:
---------------
<?php
if ($_GET['args'])
{
echo 'Result: '.unserialize(base64_decode($_GET['args']));
}
echo '<br><a
href="encode.php?args='.base64_encode(serialize('æøå')).'">Test
link</a>';
?>
Expected result:
----------------
Result: æøå
Actual result:
--------------
Result:
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45149&edit=1