Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54538 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41389 invoked from network); 12 Aug 2011 13:48:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2011 13:48:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:33608] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/11-40016-42F254E4 for ; Fri, 12 Aug 2011 09:48:21 -0400 Received: by gwb17 with SMTP id 17so2234627gwb.29 for ; Fri, 12 Aug 2011 06:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ZEej/z/Ah4z5I1P+21fvewgDexsuhAJtN67L2uuYfYg=; b=QVrN54BmpkjTV2SS5g76IEVACrANtoq1OxHnmKpUwRuOvO46Z97aPrz/ve+qM1JWRC GblcnYzA2o2UVEqPSiyIl3ne7GG2hkKNWjEu+1+s0EI8i3b47pa2e4CnYz27A122iNmL MLI5VBqkKYVTevM9lAkHPyGOCcJBJKjsnA2+A= MIME-Version: 1.0 Received: by 10.236.155.9 with SMTP id i9mr2986841yhk.168.1313156898405; Fri, 12 Aug 2011 06:48:18 -0700 (PDT) Received: by 10.146.168.9 with HTTP; Fri, 12 Aug 2011 06:48:18 -0700 (PDT) In-Reply-To: References: Date: Fri, 12 Aug 2011 15:48:18 +0200 Message-ID: To: Derick Rethans Cc: Laruence , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] behavior of translating dot in the query variable name into underscore character From: tyra3l@gmail.com (Ferenc Kovacs) On Fri, Aug 12, 2011 at 3:20 PM, Derick Rethans wrote: > On Fri, 12 Aug 2011, Laruence wrote: > >> =C2=A0 =C2=A0 =C2=A0a request uri : http://***/a.b=3D2 =C2=A0will result= $_GET["a_b"] =3D 2 ( >> the dot was translated into underscore char); >> >> =C2=A0 =C2=A0 =C2=A0my point is , since register_globals has be removed = already( in >> my opinion this behavior only make sence when register_globals on), >> should we remove this translating behavior too? > > No. No reason to change anything that isn't broken. Chanhing this will > mean a BC break, even for people that don't use register_globals. > it is broken, we just sucked it up. if we would both provide the foo_bar and foo.bar: - if your code expects foo.bar to be foo_bar, it's there. - if you expect foo.bar, it's also fine. - if you did a workaround in the past (parse the query string manually), that would also work, in the worst case, you would overwrite the foo.bar with the same value. so it's not much userland BC (not until we remove the foo_bar syntax), except maybe if you do some really strict input validation (abort if there is an request variable not specified in the whitelist). I don't mind if this only ships with the next minor or major version, but it would be really awkward keeping this workaround much longer for a design problem which isn't there anymore. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu