diff options
| author | Sara Golemon <pollita@php.net> | 2007-01-24 21:43:47 +0000 |
|---|---|---|
| committer | Sara Golemon <pollita@php.net> | 2007-01-24 21:43:47 +0000 |
| commit | cc1b19cf0e57b8b288788c592214d7aa6cc2e495 (patch) | |
| tree | 6f66777cfb92109e2d140b5c4a0a3a35a1adf7d3 /ext/standard/php_fopen_wrapper.c | |
| parent | ffcf9f5de4446b74dd4ab23c3068271369dd2953 (diff) | |
| download | php-git-cc1b19cf0e57b8b288788c592214d7aa6cc2e495.tar.gz | |
Expand allow_url_fopen/allow_url_include functionality
Diffstat (limited to 'ext/standard/php_fopen_wrapper.c')
| -rw-r--r-- | ext/standard/php_fopen_wrapper.c | 6 |
1 files changed, 4 insertions, 2 deletions
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"); } |
