Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83986 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21788 invoked from network); 27 Feb 2015 09:27:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 09:27:14 -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.192.52 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.52 mail-qg0-f52.google.com Received: from [209.85.192.52] ([209.85.192.52:34960] helo=mail-qg0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/E9-32582-07830F45 for ; Fri, 27 Feb 2015 04:27:13 -0500 Received: by mail-qg0-f52.google.com with SMTP id l89so1194495qgf.11 for ; Fri, 27 Feb 2015 01:27:10 -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=F7RIKfS93q12vfsw95o3z20RKzrB/h8ynk6uy7CMfZE=; b=XhTtLbo3ylm3LkYqZA3wnVSPpSyHbzFu8mnfs+wYfbyelxUaPDRn95Mdhf7+qBUo+E qKMpMaq2fxXFcqg5L4Psf3GynLs0FKZqPzOv4uuqoEaRaxQd/t9+b69YvbXBAwZpyfgK v5pgBUYbmxPW49R3oQ1DXUJChd6F/6K1CcnLErTRIdITWRnzSi3QXLnaJIfQBMsoKkse fzaM+pVlZnsp3sE/CHcfC0rO+g59+XnIjSA9P3fEamyPkOnoymH7+yW8aU5C/8kUAdeH CRHHIkDARvtQuCC6zDkcn6Uo3lf4ILg28gAvRwRPGH666QLsRLaBc5O3XzdO1SS96T3m Npfw== X-Received: by 10.55.43.221 with SMTP id r90mr133327qkr.53.1425029230061; Fri, 27 Feb 2015 01:27:10 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Fri, 27 Feb 2015 01:26:28 -0800 (PST) In-Reply-To: References: Date: Fri, 27 Feb 2015 18:26:28 +0900 X-Google-Sender-Auth: uZjpItN_lOA_MXcLAbxIYV0WbOg Message-ID: To: Xinchen Hui Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a114943b40d735505100e797f Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Remove allow_url_include INI From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a114943b40d735505100e797f Content-Type: text/plain; charset=UTF-8 Hi Xinchen, On Fri, Feb 27, 2015 at 4:45 PM, Xinchen Hui wrote: > Sorry, but I am confused by the point, do you want to disable include > a remote php file or not? > > if yes, how about with allow_url_fopen? > > eval(file_get_contents(http://xxxxxx/)); > > thanks > My objective is to disable "local script/file inclusion" by include/require with default usage. We have been added mitigations like allow_url_include=Off and NULL byte restriction for filename. Number of vulnerable applications are reduced, but there are many compare to other languages still. (This RFC removes allow_url_include, but introduce more specific/restrictive API and disables include 'phar://phar_file/script.php'; by default) Regarding eval(file_get_contents(http://xxxxxx/)); This kind of operation can be done in other languages also. These codes are not scope of my RFCs. If user specified to do so, it's user's problem. I would like to make PHP as secure as possible with default usage. e.g. Make include($_GET['var') not to read/execute files, but raise proper errors where it is possible as other languages do. This can be done by https://wiki.php.net/rfc/script_only_include and https://wiki.php.net/rfc/allow_url_include If anyone find missing piece, please let me know. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a114943b40d735505100e797f--