Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82061 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14773 invoked from network); 6 Feb 2015 19:03:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 19:03:04 -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.42 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qa0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:40922] helo=mail-qa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FD/EF-45146-6EF05D45 for ; Fri, 06 Feb 2015 14:03:03 -0500 Received: by mail-qa0-f42.google.com with SMTP id dc16so12303115qab.1 for ; Fri, 06 Feb 2015 11:03:00 -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=FQRkskH55L/39CsrvGEAOwyVLgE9a6MpDmV72sR7vSc=; b=OOsqPBG/eSsdXz59zJzJOFrRpYgKKaOLUxcC+8Gro24V66GeSstZT3OXbNwS0ML+M+ clyps2vNR4xPmintkiD8mIZTS+95t4thtT3x5FrK+kXkG6zHnYrf9bUvXjPPXVkCXFKt MxQ18uo5+2rQ7QAPWUbBisc26E++tsMmWRWaXApzojKas4ykMOM/X4Tv9iQyD8icUMrZ ekYUjaWFp/wKrP4lmitgUMwl1y7pYI7CRY1lI7GxVSQjK5Rc4ox50nj++F1uj2/aammh 4JilQGy7FNXN55HNwAc+a8pkPVTQpT1aY6vJ4T5SjxriCojy4Re+37GUPz1t/JWlUUpD 6FgQ== X-Received: by 10.224.161.138 with SMTP id r10mr11301645qax.21.1423249380264; Fri, 06 Feb 2015 11:03:00 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.28.72 with HTTP; Fri, 6 Feb 2015 11:02:20 -0800 (PST) In-Reply-To: References: Date: Sat, 7 Feb 2015 04:02:20 +0900 X-Google-Sender-Auth: XppYMdKz5WTW5Sc1BQ7uSwivVf8 Message-ID: To: Matthew Leverton Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e014953ecbccf44050e7011a1 Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Introduce scrpt_path From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e014953ecbccf44050e7011a1 Content-Type: text/plain; charset=UTF-8 Hi Matthew, On Sat, Feb 7, 2015 at 1:45 AM, Matthew Leverton wrote: > On Fri, Feb 6, 2015 at 6:02 AM, Yasuo Ohgaki wrote: > > https://wiki.php.net/rfc/script_path > > > > It's work in progress, but I would like to start discuss. > > > > I don't really like it; but I don't really like most INI-based solutions. > One possible alternative is use of parser state and use only upload_path. This way, we can remove one INI. > > I agree that this is a problem with poorly written code, but at the > same time I don't know that a good solution is to compensate in this > regard. Bad programmers will always be bad programmers. Now we're > giving them a crutch that almost encourages unchecked includes by > relying on an INI configuration. What happens if you are using > multiple libraries and they are each overriding their (and your) > settings? It just feels messy. > Basically, it's administrative solution. Application should set these setting or administrator should. Library shouldn't touch the setting, otherwise they hit their own foot. > > The same thing could be accomplished config-less with a callback > system that is triggered on script includes (if any callback returns > false, an error is thrown), but I think I'd dislike that for similar > reasons. If upload path is located under docroot, we must use per dir INI and set engine=off This requires administrative task (or Apache should enable .htaccess) Unlike upload_path, this couldn't prevent PHP from loading like require('../../upload/evilfile'); Since my goal is to make PHP as secure as other languages, this case may be ignored. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e014953ecbccf44050e7011a1--