Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82059 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10982 invoked from network); 6 Feb 2015 18:47:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 18:47:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.43 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.43 mail-qa0-f43.google.com Received: from [209.85.216.43] ([209.85.216.43:43398] helo=mail-qa0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/3F-45146-82C05D45 for ; Fri, 06 Feb 2015 13:47:05 -0500 Received: by mail-qa0-f43.google.com with SMTP id v10so12262914qac.2 for ; Fri, 06 Feb 2015 10:47:01 -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=2kdHkk+YgYYcFRFFUf2q7PoO0tmSGBiN8Yg1mlgtrls=; b=e5c8bPvGK1kXOel6jWPZZZpSn7xMD8oWB91kc1uYt1meQyEGcgj06w2kPp3F+2HdYd PKpztcg/p43dFpG1RZlJp3qokYUgvjGZ1kZzjloJw+sjoxxIwzOqQdOMij7C8cCJvNph 22fwc5eVYWVso1osOaLEWRbAxAwKtv9fkLWFb9bWxJ4yVlJSNiOUXPEWICK3BAaFF7MC YQooIuw3WrE8zyar+9nUeb7ddaoYiVM4Dofj+i9JR+Ow+sqiqTZleg/OwFlmZ3QXbSQ1 7PQxHuoL6Bw4FLsPjutaK7BGoqGDJPqEuAObg+wVVlXefvWvjB17sM2qU+OUAAGTQ2Yy T9BQ== X-Received: by 10.229.114.74 with SMTP id d10mr11130545qcq.5.1423248421092; Fri, 06 Feb 2015 10:47:01 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.28.72 with HTTP; Fri, 6 Feb 2015 10:46:20 -0800 (PST) In-Reply-To: References: Date: Sat, 7 Feb 2015 03:46:20 +0900 X-Google-Sender-Auth: 8fH_ENG-a-5sNqD1gvv-3b19_AE Message-ID: To: Leigh Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1133c9629103a6050e6fd8b0 Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Introduce scrpt_path From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1133c9629103a6050e6fd8b0 Content-Type: text/plain; charset=UTF-8 Hi Leigh, On Fri, Feb 6, 2015 at 9:53 PM, Leigh wrote: > On 6 February 2015 at 12:02, Yasuo Ohgaki wrote: > > Hi all, > > > > This RFC was renamed from "script() and script_once()". > > Original proposal had defect. It wasn't perfect. > > > > This RFC proposes "script_path" INI directive to eliminate > > file/script inclusion at all via require(). > > > > https://wiki.php.net/rfc/script_path > > Couple of fixes and questions > > > Introduce script_path and download_path > > Introduce script_path INI that specify directories that execution is > allowed and upload_path > > Change download_path to upload_path. > Yes, I'll fix it. > > > PHP script detection by file content is **NOT** impossible > > Therefore, PHP script detection by file content is impossible. > > I assume that you want to say impossible in both places? > Yes > > > include()/require() is source of file/script inclusion for a long time > > Only require()/require_once() is affected. > > Is this on purpose? Is there a reason that include is not affected? > include()/require() supports URI include. This is the reason why. > > I think this is a better solution than script{,_once}. I definitely > prefer it over the previous RFC I thought script()/script_once() is enough, but it's not. There are modules uses custom script loaders, including phar. Those loader may do whatever they want, therefore detecting/deciding file type (i.e. PHP script) by file content is wrong. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1133c9629103a6050e6fd8b0--