php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53805 filter_input_array ommits SERVER['REQUEST_TIME'] input
Submitted: 2011-01-21 20:30 UTC Modified: 2011-02-10 16:47 UTC
From: it at x-trader dot cz Assigned: vrana (profile)
Status: Closed Package: Filter related
PHP Version: Irrelevant OS: linux
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: it at x-trader dot cz
New email:
PHP Version: OS:

 

 [2011-01-21 20:30 UTC] it at x-trader dot cz
Description:
------------
Function filter_input_array does NOT return from SERVER input variable REQUEST_TIME key => value pair.

Tested on Linux, PHP versions 5.2.8 and 5.3.2.

May be it's undocumented feature or filter implementation failure, because filter functions are using only the original variable values passed to PHP.

Test script:
---------------
<?php
var_dump(array_diff($_SERVER, filter_input_array(INPUT_SERVER, FILTER_UNSAFE_RAW)));

Expected result:
----------------
array(0)
{
}


Actual result:
--------------
array(1)
{
'REQUEST_TIME' => int(1295636581)
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-21 20:34 UTC] rasmus@php.net
REQUEST_TIME doesn't come from the user.  It is added to the $_SERVER array after 
input filtering runs.
 [2011-01-21 21:23 UTC] it at x-trader dot cz
Thank you for your prompt response.

From the user doesn't come many other SERVER variables, for example: REDIRECT_STATUS, PATH, DOCUMENT_ROOT, SCRIPT_FILENAME, GATEWAY_INTERFACE, SERVER_PROTOCOL, REQUEST_METHOD, SCRIPT_NAME, PHP_SELF etc.

Should be at least documented.
 [2011-02-05 14:33 UTC] kalle@php.net
-Status: Open +Status: To be documented
 [2011-02-05 14:33 UTC] kalle@php.net
.
 [2011-02-10 16:47 UTC] vrana@php.net
-Status: To be documented +Status: Closed -Assigned To: +Assigned To: vrana
 [2011-02-10 16:47 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Only REQUEST_TIME is missing.
 [2011-02-10 16:47 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=308210
Log: REQUEST_TIME is missing (doc bug #53805)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 09:01:29 2024 UTC