Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28706 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38641 invoked by uid 1010); 7 Apr 2007 14:19:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 38626 invoked from network); 7 Apr 2007 14:19:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Apr 2007 14:19:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=arpad@rajeczy.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=arpad@rajeczy.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain rajeczy.com from 195.188.213.5 cause and error) X-PHP-List-Original-Sender: arpad@rajeczy.com X-Host-Fingerprint: 195.188.213.5 smtp-out2.blueyonder.co.uk Linux 2.5 (sometimes 2.4) (4) Received: from [195.188.213.5] ([195.188.213.5:49142] helo=smtp-out2.blueyonder.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/35-24330-178A7164 for ; Sat, 07 Apr 2007 10:19:31 -0400 Received: from [172.23.170.140] (helo=anti-virus02-07) by smtp-out2.blueyonder.co.uk with smtp (Exim 4.52) id 1HaBlH-0002qR-Cu for internals@lists.php.net; Sat, 07 Apr 2007 15:19:27 +0100 Received: from [82.35.52.45] (helo=[192.168.123.132]) by asmtp-out3.blueyonder.co.uk with esmtp (Exim 4.52) id 1HaBlD-0003hY-TH for internals@lists.php.net; Sat, 07 Apr 2007 15:19:24 +0100 Message-ID: <4617A86C.3030007@rajeczy.com> Date: Sat, 07 Apr 2007 15:19:24 +0100 User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: magic_quotes_gpc behaviour From: arpad@rajeczy.com (Arpad Ray) Hi all, I'm curious about something with magic_quotes_gpc - 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. While many other aspects of magic_quotes_gpc have changed, this behaviour seems to have stayed the same since at least PHP 4.2.0, see: http://www.rajeczy.com/compat_gpc_tests.txt So, is this behaviour deliberate, and if so, what's the rationale? Arpad