Re: [ZEND-ENGINE-CVS] cvs: Zend / zend_language_scanner.l

From: Date: Sat, 02 Nov 2002 16:11:34 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: Zend / zend_language_scanner.l
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-545@lists.php.net to get a copy of this message
Zeev, If a user were to use require_once or include_once they would be able to see URL paths, because they are being added to the hash. So, the fact include/require do not, is a consistency problem. Yes you are right, there a number of ways to express the same URL, but how is this relevant in this case? The purpose of my change merely accomplishes 1 task and that is to allow the user to see what files were included, regardless of whether those files were local or remote. As for PHP using the path I presume you are referring to safe_mode/open_basedir checks, those checks are being performed on the file before it gets passed to Zend, so this would hardly break anything. In fact I am certain we would have seen problems had this not been true, since include_once/require_once already store remote paths in the same field. Ilia On November 2, 2002 08:39 am, Zeev Suraski wrote: > Ilia, > > Several places in PHP assume that opened paths are real simple paths, and > not URLs. Also, as with URLs there are a zillion different ways to express > the same location, I wouldn't want to get into the business of storing URLs > in there. If we were to store this information in the future, however, it > would have to be in a separate entry, not the .opened_path one, so that we > can easily distinguish between a real opened_path and a 'requested' path. > > Zeev > > At 21:43 01/11/2002, Ilia Alshanetsky wrote: > >iliaa Sat Nov 2 00:43:13 2002 EDT > > > > Modified files: > > /Zend zend_language_scanner.l > > Log: > > Fixed bug #20214. The remotly included files now are being stored in > > the included files hash table. > > > > > >Index: Zend/zend_language_scanner.l > >diff -u Zend/zend_language_scanner.l:1.49 > > Zend/zend_language_scanner.l:1.50 --- Zend/zend_language_scanner.l:1.49 > > Wed Aug 14 20:22:38 2002 > >+++ Zend/zend_language_scanner.l Sat Nov 2 00:43:12 2002 > >@@ -397,8 +397,13 @@ > > > > > > retval = zend_compile_file(&file_handle, type TSRMLS_CC); > >- if (retval && file_handle.opened_path) { > >+ if (retval && file_handle.handle.fp) { > > int dummy = 1; > >+ > >+ if (!file_handle.opened_path) { > >+ file_handle.opened_path = filename->value.str.val; > >+ } > >+ > > zend_hash_add(&EG(included_files), > > file_handle.opened_path, strlen(file_handle.opened_path)+1, (void > > *)&dummy, sizeof(int), NULL); > > } > > zend_destroy_file_handle(&file_handle TSRMLS_CC); > > > > > > > >-- > >Zend Engine CVS Mailing List (http://cvs.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.zend-engine.cvs (#545) next »