From cc1b19cf0e57b8b288788c592214d7aa6cc2e495 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Wed, 24 Jan 2007 21:43:47 +0000 Subject: Expand allow_url_fopen/allow_url_include functionality --- ext/standard/php_fopen_wrapper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/standard/php_fopen_wrapper.c') diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 1462f4a2e3..ea1861b28f 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -187,7 +187,8 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, ch } if (!strcasecmp(path, "input")) { - if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include) ) { + /* Override default behavior for php://input when used as an include and allow_url_include is being used in BC (off) mode */ + if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include_list) ) { if (options & REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL file-access is disabled in the server configuration"); } @@ -197,7 +198,8 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, ch } if (!strcasecmp(path, "stdin")) { - if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include) ) { + /* Override default behavior for php://stdin when used as an include and allow_url_include is being used in BC (off) mode */ + if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include_list) ) { if (options & REPORT_ERRORS) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL file-access is disabled in the server configuration"); } -- cgit v1.2.1