Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29527 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9978 invoked by uid 1010); 18 May 2007 21:29:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9963 invoked from network); 18 May 2007 21:29:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2007 21:29:28 -0000 Authentication-Results: pb1.pair.com header.from=cellog@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cellog@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 66.79.163.178 cause and error) X-PHP-List-Original-Sender: cellog@php.net X-Host-Fingerprint: 66.79.163.178 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from [66.79.163.178] ([66.79.163.178:43815] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/F8-00717-6BA1E464 for ; Fri, 18 May 2007 17:29:26 -0400 Received: from mail.bluga.net (mail.bluga.net [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id AD2758741A; Fri, 18 May 2007 14:30:56 -0700 (PDT) Received: from [10.11.98.100] (166-220-082-055.mobile.mymmode.com [166.220.82.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 865898735E; Fri, 18 May 2007 14:30:52 -0700 (PDT) Message-ID: <464E1AA8.9050600@php.net> Date: Fri, 18 May 2007 16:29:12 -0500 User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Stanislav Malyshev CC: php-dev References: <464DCB8C.90803@chiaraquartet.net> <464DEF23.3080503@zend.com> <464DF139.6090405@zend.com> In-Reply-To: <464DF139.6090405@zend.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] potential solution to user streams + allow_url_include=off From: cellog@php.net (Greg Beaver) Stanislav Malyshev wrote: > oh, and I forgot another thing: > > 5. Have some function like stream_is_remote() which could check URL for > remote-ness, > so that the responsible stream wrapped would not rely on fopen erroring > out. > I couldn't locate such function, so if it isn't there it should be added. > >> I think the problem could be solved this way: >> 0. allow_url_include and allow_url_fopen renamed to >> allow_remote_include and allow_remote_fopen (not really necessary, >> just much cleaner, if you don't like it, ignore it for now). >> 1. By default, allow_remote_inclue=0, allow_remote_fopen=1 >> 2. Stream can be of three types - remote, local and user/local. >> 3. User streams can be declared when registered as either remote or >> user/local, remote being the default. >> 4. When operation on user/local stream is run, allow_remote_fopen is >> disabled if allow_remote_include was disabled. This is cleaner than my suggestion, I like it. It would also be very easy to implement. Greg