#30882 [NEW]: urldecoding (%26) before argument splitting in GET requests

From: Date: Wed, 24 Nov 2004 14:00:35 +0000
Subject: #30882 [NEW]: urldecoding (%26) before argument splitting in GET requests
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69408@lists.php.net to get a copy of this message
From: bzeeb+php at zabbadoz dot net Operating system: PHP version: 5.0.2 PHP Bug Type: URL related Bug description: urldecoding (%26) before argument splitting in GET requests 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 bug report at http://bugs.php.net/?id=30882&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30882&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30882&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30882&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30882&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30882&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30882&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30882&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30882&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30882&r=support Expected behavior: http://bugs.php.net/fix.php?id=30882&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30882&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30882&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30882&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30882&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30882&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30882&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30882&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30882&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30882&r=mysqlcfg

« previous php.bugs (#69408) next »