Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43997 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26488 invoked from network); 15 May 2009 20:25:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 May 2009 20:25:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:35764] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/69-27038-7DFCD0A4 for ; Fri, 15 May 2009 16:25:59 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 926171EBC01A; Fri, 15 May 2009 20:29:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xMwdhhNKOPxY; Fri, 15 May 2009 22:29:17 +0200 (CEST) Received: from [192.168.0.151] (77-58-147-159.dclient.hispeed.ch [77.58.147.159]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id DD3BA1EBC019; Fri, 15 May 2009 22:29:16 +0200 (CEST) Cc: Rasmus Lerdorf , PHP Development Message-ID: To: Michael Shadle In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Fri, 15 May 2009 22:25:53 +0200 References: <4A0C9516.8060808@gmail.com> <4A0D2648.3050802@lerdorf.com> X-Mailer: Apple Mail (2.935.3) Subject: Re: [PHP-DEV] Re: Why does $_REQUEST exist? From: mls@pooteeweet.org (Lukas Kahwe Smith) On 15.05.2009, at 19:14, Michael Shadle wrote: > On Fri, May 15, 2009 at 1:32 AM, Lukas Kahwe Smith > wrote: > >>> The more stuff like this we remove, the harder it becomes for >>> people to >>> quickly move to newer, faster and more secure versions of PHP. That >>> causes way more frustration for everyone than a few "ugly" legacy >>> features. If there is a decent technical reason, performance or >>> security, then we need to take a hard look at it. In this case, the >>> thing we should be looking at isn't whether we should remove >>> $_REQUEST >>> but whether we should remove cookie data from it. Many >>> configurations >>> already do that, including all of my own, and there is a strong >>> valid >>> security reason for not including cookies in $_REQUEST. Most >>> people use >>> $_REQUEST to mean GET or POST, not realizing that it could also >>> contain >>> cookies and as such bad guys could potentially do some cookie >>> injection >>> tricks and break naive applications. > > But since there is going to be a dramatic change here anyway, this is > the perfect time to do it. To me adding namespaces is a lot more scary > and will lead to a lot of confusing code... Confusing new code is totally different from breaking existing code. >> Its already fixed in 5.3. There is a new ini option that defines >> what should >> go into $_REQUEST. See the following blog post for details: >> http://www.suspekt.org/2008/10/01/php-53-and-delayed-cross-site-request-forgerieshijacking/ >> >> Also a lot of work was put into restructuring the php.ini files we >> ship with >> PHP. > > This is a good step I think; will it be possible to allow it to be > empty and have $_REQUEST not exist or even be initialized? > > Also, you said it yourself in your blog - not caring what is done via > GET and POST is bad practice. Why not enforce this in the engine? Just FYI: Not sure which blog you are talking about, but that is Stefan Esser's blog that is linked above. > Also, I had thought $_REQUEST had included session data too. At least > that is not there. Talk about easy exploitation options then! :) Indeed, that would have been insane. regards, Lukas Kahwe Smith mls@pooteeweet.org