mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
data: and php:stdin/input allow_url_include checks
This commit is contained in:
parent
86a6812dbb
commit
cea64d52fa
@ -187,10 +187,22 @@ 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) ) {
|
||||
if (options & REPORT_ERRORS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL file-access is disabled in the server configuration");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return php_stream_alloc(&php_stream_input_ops, ecalloc(1, sizeof(off_t)), 0, "rb");
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcasecmp(path, "stdin")) {
|
||||
if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include) ) {
|
||||
if (options & REPORT_ERRORS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL file-access is disabled in the server configuration");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
if (!strcmp(sapi_module.name, "cli")) {
|
||||
static int cli_in = 0;
|
||||
fd = STDIN_FILENO;
|
||||
|
Loading…
Reference in New Issue
Block a user