Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82354 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56211 invoked from network); 10 Feb 2015 09:42:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2015 09:42:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.179 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.179 mail-qc0-f179.google.com Received: from [209.85.216.179] ([209.85.216.179:61921] helo=mail-qc0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/EE-47508-91DC9D45 for ; Tue, 10 Feb 2015 04:19:21 -0500 Received: by mail-qc0-f179.google.com with SMTP id r5so5766741qcx.10 for ; Tue, 10 Feb 2015 01:19:18 -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=yssbOCl0xmTqQOE8jkqu71sqdqDOhBq3MxtOM/4GGzc=; b=kIaenT4zGzQfUU8XYrmVuFcgTecPPpS+BrS4f3WOIjbYCxST6MsSoaAqrY4rRKEj6O qe6U1FF4yzJJ3qCgXwVd9RMsmTd98MD7MlH3A0YfeahX70kjL09dDtVFqZQNRVdpqM1q xE3WaPPVgqA281y/kRnLooD2b604E6b/M51gvg1bVJ3jWV4OWyBtd2yxji3DQzoscaS7 6FDy1pHUqoLD8smTf5WnkPtVQSoikWdkAFLUuXqlKZqyG4SpLRQg/CYasr3Rgr5RV0tN j4eMfsU4AAlx4FgmaJwSVtRalB3HLWoCOc7JNOGz/zEcE0A6WVGsgbS/F16lOz6H6UwJ 8o4w== MIME-Version: 1.0 X-Received: by 10.140.100.226 with SMTP id s89mr49282817qge.96.1423559958243; Tue, 10 Feb 2015 01:19:18 -0800 (PST) Received: by 10.96.185.37 with HTTP; Tue, 10 Feb 2015 01:19:18 -0800 (PST) In-Reply-To: References: Date: Tue, 10 Feb 2015 16:19:18 +0700 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Script only includes From: pierre.php@gmail.com (Pierre Joye) On Tue, Feb 10, 2015 at 7:52 AM, Yasuo Ohgaki wrote: > Hi all, > > Some of you are tired with this topic, but please take a look the RFC > > [RFC] Script only includes - this is 3rd version. > https://wiki.php.net/rfc/script_only_include > > Please let me know what you like or dislike. I said before but this RFC tries to solve a problem using yet another "security" feature in the engine while the OS and the webserver provides way better solutions without adding a possible new pandora box from a security point of view. Many extensions may have to deal with it too. I can only create an empty for all upcoming CVEs about xyz not following script_embed. Alone that tells me that we should not try again to make php "more secure" using such features. I suppose script_embed ini setting is siimilar to open_basedir but for exec only, which would prevent any script to be exec'ed (require, include, via handlers but works for fopen&co) while open_basedir would remain the same (aka also for fopen&co). Now, that does prevent one to shoot himself in the foot, eval(file_get_contents());. Yes, this is stupid thing to do, just a bit more stupid that require "someuploadedfile"; but not much more. Trying to implement security measures to prevent people to exec codes from an unknown file is a bad idea. They will do it one way or another. And if anyone application still do include/require(random/uploaded files), then they surely have many other problems to solve but none of them is really a php problem. Cheers, -- Pierre @pierrejoye | http://www.libgd.org