php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18776 using & instead of "&" causes malformed HTTP_REFERER
Submitted: 2002-08-07 06:11 UTC Modified: 2002-08-07 06:18 UTC
From: rob at pipgroup dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.2 OS: Win2K
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rob at pipgroup dot com
New email:
PHP Version: OS:

 

 [2002-08-07 06:11 UTC] rob at pipgroup dot com
when using "&" instead of "&" to separate variables passed through a url causes HTTP_REFERER to include all the url after the first &.

According to the W3C & should be used to avoid confusion with & being used as a character entity identifier.

This is a big problem when passing variables out of a page for processing on a second page which then uses a header() redirect back to the original page.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-07 06:18 UTC] markonen@php.net
Actually I think that W3C recommends either & or just a semicolon as the parameter separator.

You are encountering a user agent issue. PHP doesn't parse the Referer header; it's there exactly like the user agent sent it.

User agents generally know that a "&" in a href attribute be decoded and a plain "&" sent to the server when accessing the location. It seems that your browser doesn't do this for &.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC