Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82014 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66346 invoked from network); 6 Feb 2015 04:52:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 04:52:47 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.169 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.169 mail-qc0-f169.google.com Received: from [209.85.216.169] ([209.85.216.169:56383] helo=mail-qc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/A4-45146-F9844D45 for ; Thu, 05 Feb 2015 23:52:47 -0500 Received: by mail-qc0-f169.google.com with SMTP id b13so10146159qcw.0 for ; Thu, 05 Feb 2015 20:52:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1chlJ+v4QZpG/P9R8jgvAGCJkJdeoK21RHEou0wcJmg=; b=HDBkG/r6BkrnfkXc0Ic7OSSrrX1/fjFQjxOF9XhzxMnLYwHQd2Hvt3WRJmyY/0253S Bxye+avasJNj5JxapgAeQRGOdyvbPSclDOlU131OsR6YIRp+po9in2TJNpah+WZXO/f3 KRyH6zRZA6yCGP7wxnap1Ks8qbO8SLS/EsEIwCxfyBBSEnlo2a177nyvVqGeN24vMRcF zVQakMUAH6iSKAiO5Wmm6qNOU3DebFfI2CoFRF8DAulwA+YfobrBK5Yj54uAYzNwA8gj mXmq3WZFFbWHrhSWFguGZBb3xkjHokxJ4GMl0y69lRvby14oJutictXce2tHPv5l8LBE 5r0w== MIME-Version: 1.0 X-Received: by 10.224.89.65 with SMTP id d1mr4424677qam.40.1423198365054; Thu, 05 Feb 2015 20:52:45 -0800 (PST) Received: by 10.96.3.168 with HTTP; Thu, 5 Feb 2015 20:52:44 -0800 (PST) In-Reply-To: References: Date: Fri, 6 Feb 2015 11:52:44 +0700 Message-ID: To: Yasuo Ohgaki Cc: Adam Harvey , PHP internals , Leigh , reeze Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [RFC][DISCUSSION] script() and script_once() From: pierre.php@gmail.com (Pierre Joye) On Fri, Feb 6, 2015 at 11:35 AM, Yasuo Ohgaki wrote: > Hi Pierre, > > On Fri, Feb 6, 2015 at 1:16 PM, Pierre Joye wrote: >> >> > With SElinux, we can restrict access. However, PHP should be able to >> > read/write >> > uploaded files. PHP just read and execute them with include. >> >> Again, I am talking about executing files. You can exclude a file, >> path, folder for being invoked with a handler or similar things on a >> web server. It has nothing to do with the PHP ability to access this >> file as normal data. That won't prevent a file_get_contents+eval but >> you get the idea. > > > OK. > >> >> >> > Is windows possible to prevent PHP to load script and execute? While >> > allowing write/read access? >> >> Yes and no. It is a web server role. Linux allows access restrictions >> too, windows only provides a much more fine grained ACL. But again, it >> is not what I am referring to. >> >> >> > 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. But it is the key point. It is not PHP role to do it. PHP is not alone. It is a server configuration job. But I have said that already many times, we got our points :) -- Pierre @pierrejoye | http://www.libgd.org