#45149 [Opn]: Handling plus sign in an url failed

From: Date: Mon, 02 Jun 2008 14:25:31 +0000
Subject: #45149 [Opn]: Handling plus sign in an url failed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125431@lists.php.net to get a copy of this message
 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



Thread (8 messages)

« previous php.bugs (#125431) next »