Re: open_basedir_for_include

From: Date: Sat, 25 Mar 2006 16:55:57 +0000
Subject: Re: open_basedir_for_include
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-22579@lists.php.net to get a copy of this message
But it does prevent writing to those dirs. Ilia Alshanetsky wrote:
Why not just add the dirs you intend to include from to open_basedir directly? It does not prevent arbitrary files from being loaded anyway from those dirs. A simple ob_start() include "file"; ob_get_clean() will happily give you the data. And if you wanted to see the source code, highlight_file() could be used. Ilia Sara Golemon wrote:
The PDM recommendation covering the removal of safe_mode included a note on expanding the role of open_basedir. To that end, I'd like to propose introducing a new ini option: open_basedir_for_include which would allow using include/require(_once) on an expanded set of directories than what open_basedir would otherwise allow. Since php_fopen_wrapper_for_zend() specifies STREAM_OPEN_FOR_INCLUDE, we can catch this option in the plain_files wrapper and expand the open_basedir check to allow specifying the alternate INI option (when set of course). Obviously if this new option were left unset and the regular open_basedir were set, we'd still use that for full BC. If noone objects I'll add this functionality in between unicode related patches in a week or so. -Sara


« previous php.internals (#22579) next »