Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66585 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40146 invoked from network); 11 Mar 2013 12:34:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2013 12:34:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=keisial@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=keisial@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.172 as permitted sender) X-PHP-List-Original-Sender: keisial@gmail.com X-Host-Fingerprint: 74.125.82.172 mail-we0-f172.google.com Received: from [74.125.82.172] ([74.125.82.172:51740] helo=mail-we0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/7A-09030-07FCD315 for ; Mon, 11 Mar 2013 07:34:57 -0500 Received: by mail-we0-f172.google.com with SMTP id d46so3397810wer.31 for ; Mon, 11 Mar 2013 05:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=aoikcBOflUQvNkKknNy+QoxoCq+17QLsVAJtXKW7zXs=; b=ynMDrWF/SJdEVFMTOR5BgSljCjbUKMB0s44E4tuytQoAbAeMYbfB2pXv2hNLsFUufW mnDtQ0/OIqSEJUYZw+NdDUqWpDq+pvOgO7wVsp8o7UUxSGxRVWwpKpCUANoYuuTLGxdb ufKfgOOT477I62hZPheRUd7m+/EFvRVDl/1o98qQJf2aRi3cmO24HAjUE/2ufUhgn8F4 A3RRqbeGxgPUxWmNsj7iisYbAUR3qHP8CfssyeFa5Wy/haKZVYVFHioFI8DQaQy5C175 C74643c2LUOAbZtN+fg6/v/aPvIgF/qFLlpaN6vW01SabEGwfySJDvIRVZNyr2L0t6eW Xy5w== X-Received: by 10.180.74.228 with SMTP id x4mr12325923wiv.0.1363005292282; Mon, 11 Mar 2013 05:34:52 -0700 (PDT) Received: from [192.168.1.26] (54.Red-81-38-89.dynamicIP.rima-tde.net. [81.38.89.54]) by mx.google.com with ESMTPS id fg6sm16852349wib.10.2013.03.11.05.34.50 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Mar 2013 05:34:51 -0700 (PDT) Message-ID: <513DCE2B.5090008@gmail.com> Date: Mon, 11 Mar 2013 13:29:31 +0100 User-Agent: Thunderbird MIME-Version: 1.0 To: Christian Stoller CC: Stas Malyshev , "internals@lists.php.net" References: <4ED7146272E04A47B986ED49E771E347BB431FB852@Ikarus.ameusgmbh.intern> <513DB14F.6020400@sugarcrm.com> <4ED7146272E04A47B986ED49E771E347BB431FB86D@Ikarus.ameusgmbh.intern> In-Reply-To: <4ED7146272E04A47B986ED49E771E347BB431FB86D@Ikarus.ameusgmbh.intern> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336) From: keisial@gmail.com (=?UTF-8?B?w4FuZ2VsIEdvbnrDoWxleg==?=) On 11/03/13 12:36, Christian Stoller wrote: > Hi Stas. >> I'm afraid it is not a good idea. allow_url_fopen is meant to protect >> file functions (fopen and friends) from being injected with >> user-controlled data - i.e. if you control the filesystem and you do >> fopen() under allow_url_fopen then it is reasonable to assume the data >> under that filename is under your control. However, data:// URLs clearly >> violate this assumption no less than http:// URLs do - data: just does >> it without even requiring a web server. > I am unsure whether I understand you. As far as I know with the data:// stream PHP does not access any file on the filesystem. It's just for transforming normal content in a variable to a resource, or not? So I do not see any risk. Maybe you can give me an example. Suppose you had the silly script: