Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83710 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79825 invoked from network); 24 Feb 2015 22:55:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 22:55:14 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.174 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.174 mail-qc0-f174.google.com Received: from [209.85.216.174] ([209.85.216.174:41158] helo=mail-qc0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/3A-24698-D310DE45 for ; Tue, 24 Feb 2015 17:55:13 -0500 Received: by qcvs11 with SMTP id s11so104982qcv.8 for ; Tue, 24 Feb 2015 14:54:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=I6yR3HhHT/G9A/CaxRrCOF+0bqQmUecUxJNZAFWHbhE=; b=SC0xvOSzSm/MI37Tii4d76XJcpZ65E2BVVtYIAP4zcjkAvJ1xY4tNbEHQ3oyuwpmIB f0Hs09OuWl9sFObt93nYicEzWbpj8YK6Ax5V4OkYBVU5UZ8tS6Wh00YbD2rYAu5Og4PE 2qNzQgh5r1AuoeLzyocrwB+c9ogPuVj4OY1dQr/XyB9RXS4NmUmDHeWi0sU0M4hgk6Uk EHRcL8q2H740YR3wQbLLP1BeCyloO7m5uI+Woc6I52x9tszYsTL+kDbASxchOfwy4+tv cRM3kl1E6oi6UHUfrNZa8iYXmV4zvQAhmvcqwX03/KIhZ9Ifrcedql9YaPpO5A9LCJv1 d08A== X-Received: by 10.140.195.195 with SMTP id q186mr278736qha.81.1424818453716; Tue, 24 Feb 2015 14:54:13 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Tue, 24 Feb 2015 14:53:33 -0800 (PST) In-Reply-To: <54ECFBA7.7080404@gmail.com> References: <54ECD4E3.9040705@gmail.com> <54ECF605.7030506@gmail.com> <54ECFBA7.7080404@gmail.com> Date: Wed, 25 Feb 2015 07:53:33 +0900 X-Google-Sender-Auth: Mkur0Z8temzM_vWuAQGtumNoRNI Message-ID: To: Stanislav Malyshev Cc: =?UTF-8?Q?P=C3=A1draic_Brady?= , Dmitry Stogov , "internals@lists.php.net" , Nikita Popov Content-Type: multipart/alternative; boundary=001a1143254ecda4ef050fdd6542 Subject: Re: [PHP-DEV] [RFC] Script only include/require From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1143254ecda4ef050fdd6542 Content-Type: text/plain; charset=UTF-8 Hi Stas, On Wed, Feb 25, 2015 at 7:31 AM, Stanislav Malyshev wrote: > > I think he means matching file "extension". File extension should > > represent file type, though. > > You can not rely on that. I can name files anything regardless of what's > in the file. > > > Since "pwnd.php" has ".php" extension, move_uploaded_file() refuses to > > move it > > to upload dir by default. > > There's no pwnd.php. The file that I upload is "cuteponies.gif". Please > look at the sequence again carefully. require('cuteponies.gif) wouldn't work with this RFC. move_uploaded_files() prohibits uploading PHP script. I noticed that I should forbid destination file extension also by this discussion. I'll add it soon. Thank you. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1143254ecda4ef050fdd6542--