|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: smsc at gmx dot de
New email:
PHP Version: OS:


 [2004-10-16 21:06 UTC] smsc at gmx dot de
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:

Actual result:
1 1
1 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-17 02:32 UTC]
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 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: Fri Jul 19 04:01:28 2024 UTC