php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30460 vars from querystring are bad/wrong urldecoded
Submitted: 2004-10-16 21:06 UTC Modified: 2004-10-17 02:32 UTC
From: smsc at gmx dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.3.8 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: smsc at gmx dot de
New email:
PHP Version: OS:

 

 [2004-10-16 21:06 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-17 02:32 UTC] derick@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC