Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66580 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22828 invoked from network); 11 Mar 2013 10:26:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Mar 2013 10:26:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.113 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.113 smtp113.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.113] ([67.192.241.113:56987] helo=smtp113.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/A7-09030-251BD315 for ; Mon, 11 Mar 2013 05:26:27 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp21.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 61BF3240C72; Mon, 11 Mar 2013 06:26:24 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp21.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 18A3E240C39; Mon, 11 Mar 2013 06:26:24 -0400 (EDT) Message-ID: <513DB14F.6020400@sugarcrm.com> Date: Mon, 11 Mar 2013 03:26:23 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130216 Thunderbird/17.0.3 MIME-Version: 1.0 To: Christian Stoller CC: "internals@lists.php.net" References: <4ED7146272E04A47B986ED49E771E347BB431FB852@Ikarus.ameusgmbh.intern> In-Reply-To: <4ED7146272E04A47B986ED49E771E347BB431FB852@Ikarus.ameusgmbh.intern> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336) From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I have run into a bug, which is open since 2009. It would be nice if > you could look at https://bugs.php.net/bug.php?id=47336 It has been > marked as “documentation problem”. But in my opinion the > implementation should follow the documentation and allow fopen > “data://” streams even if “allow_url_fopen” is set to “false”. > Because it is not like opening a maybe manipulated URL. > > It would be really nice if this bug could be fixed, soon. 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. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227