#30882 [Opn->Csd]: urldecoding (%26) before argument splitting in GET requests

From: Date: Wed, 24 Nov 2004 22:27:41 +0000
Subject: #30882 [Opn->Csd]: urldecoding (%26) before argument splitting in GET requests
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69426@lists.php.net to get a copy of this message
ID: 30882 Updated by: iliaa@php.net Reported By: bzeeb+php at zabbadoz dot net -Status: Open +Status: Closed Bug Type: URL related PHP Version: 5.0.2 New Comment: Works fine in latest CVS. Previous Comments: ------------------------------------------------------------------------ [2004-11-24 15:00:34] bzeeb+php at zabbadoz dot net Description: ------------ urldecoding seems to be done before arguemtns get split for $_REQUEST etc. Thus foo=test%026test becomes: foo=test test= instead of foo=test&test worked correctly in php 4.3.3. Reproduce code: --------------- <? if (isset($_REQUEST['foo'])) { echo "<tt>'" . $_REQUEST['foo'] . "'</tt> -- "; print_r($_REQUEST); } ?> Expected result: ---------------- GET test.php?foo=test+test Expected: 'test test' -- Array ( [foo] => test test ) -> As expected GET test.php?foo=test+test%26test Expected: 'test test&test' -- Array ( [foo] => test test&test ) Actual result: -------------- GET test.php?foo=test+test Result: 'test test' -- Array ( [foo] => test test ) -> As expected GET test.php?foo=test+test%26test Result: 'test test' -- Array ( [foo] => test test [test] => ) -> BUG. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30882&edit=1

« previous php.bugs (#69426) next »