Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82013 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64914 invoked from network); 6 Feb 2015 04:51:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 04:51:04 -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:56738] helo=mail-qc0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/44-45146-73844D45 for ; Thu, 05 Feb 2015 23:51:03 -0500 Received: by mail-qc0-f174.google.com with SMTP id s11so10141655qcv.5 for ; Thu, 05 Feb 2015 20:51: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=POFZy9qY+P+Vi8MS6QbdVlwAcKFvTub1rk9YXP4eyFw=; b=nfQIXVg5ECh0+WB2/26nor/hz+dF30GpsB8R27yHOQ+vbQi4EndaKgu4lp3YSFyXJJ VcaoroqG++1HVghix00o7Rtqg6ub5IhoZrMiW36KIy9AvTgWK0xvlGzqWXW/yyhd4//O SO6ktq3FRCSpIBcfptXi53j2MBz6Fif0TBMZaQQ+Bi2oxbhjeB8X14MoElau06YGz4S6 HffCJeMB/uhH6gpAA3UqZyaE79CteuVElxL+xuxSn9hqyiu062hYLmwNaoFb16pgu10I Q8hCU6+KhJHVYypfaflQqR5qzWYdlc0Y7uSezdZT8KZkz6ZoNbPgk/PGCLun7//bx0I+ zUSg== X-Received: by 10.224.161.138 with SMTP id r10mr4293026qax.21.1423198261231; Thu, 05 Feb 2015 20:51:01 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.28.72 with HTTP; Thu, 5 Feb 2015 20:50:20 -0800 (PST) In-Reply-To: References: Date: Fri, 6 Feb 2015 13:50:20 +0900 X-Google-Sender-Auth: d40lkOy6wge9oPe84yvPPx_XSHE Message-ID: To: Pierre Joye Cc: Adam Harvey , PHP internals , Leigh , reeze Content-Type: multipart/alternative; boundary=089e014953ecce45aa050e642abc Subject: Re: [PHP-DEV] Re: [RFC][DISCUSSION] script() and script_once() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e014953ecce45aa050e642abc Content-Type: text/plain; charset=UTF-8 Hi all, On Fri, Feb 6, 2015 at 1:35 PM, Yasuo Ohgaki wrote: > > I have similar idea for PHP to have data only dirs. >> >> We have that already, not for php, but for web servers. This is their >> job to deal with that. > > > Yes, indeed. > engine=off > per dirs. This is what I suggest people. It cannot prevent other dir's > PHP scripts to load & execute. Public upload dir must have this setting. > > My idea is controlling it from PHP, not as web server management. > It's better than per dir "engine=off". > It's not too important for me now, so it's not my priority. > I take it back. I must include the idea in this RFC to be complete. Since Zend allows custom script loader. Phar is integrated into PHP. There are number of byte compilers. Some of them allow encryption. We need script only include statement as well as data only dirs or script only dirs. Specifying script only dirs is better because it is white list. Programs should choose white list whenever it's possible rather than black list. If there is upload dir in system, PHP may execute files in the upload dir. It's impossible to specify/detect which one is PHP script or not because of custom script loader. Therefore, PHP must have both script only inclusion and script only dirs configuration. Any comments on this? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e014953ecce45aa050e642abc--