summaryrefslogtreecommitdiff
path: root/main/streams/plain_wrapper.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2009-11-12 15:05:03 +0000
committerJohannes Schlüter <johannes@php.net>2009-11-12 15:05:03 +0000
commit473d75475a7b65650714a1b2feaa0dc51f3f83f3 (patch)
tree401a954ce70521ac3e096dc99579940dc68fb670 /main/streams/plain_wrapper.c
parenta12240f5c785327c6331f411317e6fe90594d672 (diff)
downloadphp-git-473d75475a7b65650714a1b2feaa0dc51f3f83f3.tar.gz
Fix #50063 (safe_mode_include_dir fails)
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r--main/streams/plain_wrapper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 6cf35a6252..6bf81e06ac 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -988,6 +988,10 @@ static php_stream *php_plain_files_stream_opener(php_stream_wrapper *wrapper, ch
return NULL;
}
+ if ((php_check_safe_mode_include_dir(path TSRMLS_CC)) == 0) {
+ return php_stream_fopen_rel(path, mode, opened_path, options);
+ }
+
if ((options & ENFORCE_SAFE_MODE) && PG(safe_mode) && (!php_checkuid(path, mode, CHECKUID_CHECK_MODE_PARAM)))
return NULL;