From:             smsc at gmx dot de
Operating system: Any
PHP version:      4.3.8
PHP Bug Type:     Variables related
Bug description:  vars from querystring are bad/wrong urldecoded

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 bug report at http://bugs.php.net/?id=30460&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30460&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30460&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30460&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30460&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30460&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30460&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30460&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30460&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30460&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30460&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30460&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30460&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30460&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30460&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30460&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30460&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30460&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30460&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30460&r=mysqlcfg

Reply via email to