php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26068 referrer uri missing arguments
Submitted: 2003-11-01 12:50 UTC Modified: 2003-11-02 14:23 UTC
From: sanondysie at tc17 dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.3.4RC3 OS: Windows 98
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: sanondysie at tc17 dot com
New email:
PHP Version: OS:

 

 [2003-11-01 12:50 UTC] sanondysie at tc17 dot com
Description:
------------
This appears to be Windows 98 (all Win32??) only; it works on Linux. The problem is that the referrer uri is missing any arguments that might have been appended. For the attached sample, you need to Submit at least twice to see the problem. This was tested with an Xitami HTTP server.

Reproduce code:
---------------
<html>
 <head/>
 <body>
  <p>
   Referrer:<br/>
   <table>
    <tr>
     <td>
      PHP:
     </td>
     <td>
      <?PHP print $_SERVER ["HTTP_REFERER"]; ?>
     </td>
    </tr>
    <tr>
     <td>
      Javascript:
     </td>
     <td>
      <script>document.write (document.referrer);</script>
     </td>
    </tr>
   </table>
  </p>

  <form		action=	"<?php print $_SERVER ["SCRIPT_NAME"]; ?>"
		method=	"get">
   <input	type=	"hidden"
		name=	"param"
		value=	"value">
   <input	type=	"submit">
  </form>
 </body>
</html>


Expected result:
----------------
Both referrers should be identical. You need to click Submit twice to get a referrer supplying arguments.

Actual result:
--------------
PHP will show arguments missing.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-01 15:22 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.

PHP does not modify the HTTP_REFERER field, what the browser sends is what you get. If you don't it means the webserver had applied some filtering.
 [2003-11-01 17:31 UTC] sanondysie at tc17 dot com
Sorry but that is exactly and precisely why the Javascript is there in the example that I expended the time and energy to produce. If the http server had stripped argument then Javascript would __NOT__ have been able to see it... but it __DOES__, in fact, see the argument; therefore, the http server is, indeed delivering all the goods. PHP otoh does not report the argument, once again, presumably only on Windows platform(s).
 [2003-11-02 14:23 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.

JavaScript is not from the server, it is run from the host browser. If the webserver internally modified the HTTP_REFERER header, the JavaScript would not reflect this change in any way.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 03:03:14 2021 UTC