Doc #76637 [Opn]: Default $_REQUEST is Misrepresented in Documentation
Edit report at https://bugs.php.net/bug.php?id=76637&edit=1
ID: 76637
Updated by: cmb@php.net
Reported by: dor dot tumarkin at checkmarx dot com
Summary: Default $_REQUEST is Misrepresented in Documentation
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Any
PHP Version: 7.2.7
Block user comment: N
Private report: N
New Comment:
It seems to me that the default is indeed "GPC", since
request_order defaults to NULL[1] as of PHP 5.3.0, and as such the
default of variables_order is relevant which is "EGPCS"[2].
It might be useful to document the default development/production
value, or perhaps it would be better to match the default values
with either of those.
[1] <https://github.com/php/php-src/blob/php-7.2.8/php.ini-production#L136-L139>
[2] <https://github.com/php/php-src/blob/php-7.2.8/php.ini-production#L161-L164>
Previous Comments:
------------------------------------------------------------------------
[2018-07-18 10:10:25] dor dot tumarkin at checkmarx dot com
Description:
------------
---
From manual page: http://www.php.net/reserved.variables.request
---
Documentation states the $_REQUEST is "An associative array that by default contains the
contents of $_GET, $_POST and $_COOKIE."
In PHP 7.2.7 (and likely several versions lower), $_COOKIE is not part of $_REQUEST by default,
though it could be re-enabled via php.ini. The default behavior is to only include $_GET and $_POST
in request_order "due to security concerns", likely because adding C for $_COOKIES enables
a wider breadth for value shadowing attacks.
Test script:
---------------
Not applicable.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76637&edit=1
Thread (3 messages)