#41093 [Opn]: magic_quotes_gpc ignores first arrays keys
| From: | arpad@php.net | Date: | Sun, 15 Apr 2007 10:04:19 +0000 |
| Subject: | #41093 [Opn]: magic_quotes_gpc ignores first arrays keys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111504@lists.php.net to get a copy of this message | ||
ID: 41093
User updated by: arpad@php.net
Reported By: arpad@php.net
Status: Open
Bug Type: Scripting Engine problem
Operating System: Irrelevant
PHP Version: 5.2.1
New Comment:
NB: I specified 5.2.1 to keep the bug tracker happy, but as you can see
from the linked tests, this bug is present in every version I tested (>=
4.2.0).
Previous Comments:
------------------------------------------------------------------------
[2007-04-15 09:58:58] arpad@php.net
Description:
------------
When magic_quotes_gpc is on, it ignores the keys of array values in
$_GET etc, despite escaping keys of scalar values and all keys in
contained arrays. For example, the query string ?a'b=1 yields
$_GET[a\'b] = 1, but ?a'b[a'b]=1 yields $_GET[a'b][a\'b] = 1.
http://www.rajeczy.com/compat_gpc_tests.txt
Reproduce code:
---------------
?a'b[a'b]=1
Expected result:
----------------
$_GET[a\'b][a\'b] = 1
Actual result:
--------------
$_GET[a'b][a\'b] = 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41093&edit=1