summaryrefslogtreecommitdiff
path: root/main/streams/streams.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/streams/streams.c')
-rwxr-xr-xmain/streams/streams.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 24496d7c54..e484b7f9cb 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -2163,8 +2163,9 @@ PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char
return plain_files_wrapper;
}
- if (!php_stream_allow_url_fopen(protocol, n) ||
- ((options & STREAM_OPEN_FOR_INCLUDE) && !php_stream_allow_url_include(protocol, n)) ) {
+ if (((options & STREAM_DISABLE_URL_PROTECTION) == 0) &&
+ (!php_stream_allow_url_fopen(protocol, n) ||
+ ((options & STREAM_OPEN_FOR_INCLUDE) && !php_stream_allow_url_include(protocol, n)))) {
if (options & REPORT_ERRORS) {
/* protocol[n] probably isn't '\0' */
char *protocol_dup = estrndup(protocol, n);
@@ -2797,7 +2798,7 @@ PHPAPI int _php_stream_path_encode(php_stream_wrapper *wrapper,
return FAILURE;
}
- wrapper = php_stream_locate_url_wrapper(scheme, NULL, options TSRMLS_CC);
+ wrapper = php_stream_locate_url_wrapper(scheme, NULL, options | STREAM_DISABLE_URL_PROTECTION TSRMLS_CC);
efree(scheme);
if (!wrapper) {
*pathenc = NULL;