Bug #53805 [Opn]: filter_input_array ommits SERVER['REQUEST_TIME'] input

From: Date: Fri, 21 Jan 2011 20:23:19 +0000
Subject: Bug #53805 [Opn]: filter_input_array ommits SERVER['REQUEST_TIME'] input
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-158047@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53805&edit=1

 ID:                 53805
 User updated by:    it at x-trader dot cz
 Reported by:        it at x-trader dot cz
 Summary:            filter_input_array ommits SERVER['REQUEST_TIME']
                     input
 Status:             Open
 Type:               Bug
 Package:            Filter related
 Operating System:   linux
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2011-01-21 20:34:39] 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 20:30:53] 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)
}



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53805&edit=1


Thread (5 messages)

« previous php.bugs (#158047) next »