php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24777 $_GET values truncated at %3C in query string
Submitted: 2003-07-23 15:59 UTC Modified: 2003-07-23 16:58 UTC
From: csnyder at chxo dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.3.2 OS: Linux / FreeBSD
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: csnyder at chxo dot com
New email:
PHP Version: OS:

 

 [2003-07-23 15:59 UTC] csnyder at chxo dot com
Description:
------------
Anything after %3C (>) in a query string value is being ignored by parse_str().

For instance, given the request:
http://example.com/script.php?to=me+%3Cmail%40example.com%3E

$_GET['to'] is "me " instead of "me <mail@example.com>"


Reproduce code:
---------------
$query= "to=".urlencode("me <mail@example.com>");
parse_str($query);
print $to;

Expected result:
----------------
me <mail@example.com>

Actual result:
--------------
me 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-23 16:58 UTC] iliaa@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.

It works fine, your browser simply treating <email> as HTML tag and not showing it. If you view the HTML source you'll see all of the text.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 15:01:24 2019 UTC