#30460 [Opn->Bgs]: vars from querystring are bad/wrong urldecoded
| From: | derick@php.net | Date: | Sun, 17 Oct 2004 00:32:37 +0000 |
| Subject: | #30460 [Opn->Bgs]: vars from querystring are bad/wrong urldecoded | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67673@lists.php.net to get a copy of this message | ||
ID: 30460
Updated by: derick@php.net
Reported By: smsc at gmx dot de
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Any
PHP Version: 4.3.8
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
This is a feature, not a bug.
Previous Comments:
------------------------------------------------------------------------
[2004-10-16 21:06:35] smsc at gmx dot de
Description:
------------
Passing variables like e.g. urls which contain a + char in filenames or
simple math questions like 1+1 is not possible because vars are
urldecoded before they are passed on within php. A "+" in the variable
is always "decoded" to space, which makes it impossible to take user
input like not encoded urls or math questions directly but requires
parsing by hand from querystring.
Reproduce code:
---------------
print $_SERVER['QUERY_STRING']."<BR>";
print $_GET['var']."<BR>";
print $var;
called with ..script.php?var=1+1 (register_globals on)
Expected result:
----------------
var=1+1
1+1
1+1
Actual result:
--------------
var=1+1
1 1
1 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30460&edit=1