]> granicus.if.org Git - php/commitdiff
Fix #50063 (safe_mode_include_dir fails)
authorJohannes Schlüter <johannes@php.net>
Thu, 12 Nov 2009 15:05:03 +0000 (15:05 +0000)
committerJohannes Schlüter <johannes@php.net>
Thu, 12 Nov 2009 15:05:03 +0000 (15:05 +0000)
main/streams/plain_wrapper.c

index 6cf35a62529013c35af70ed2e242e16b35b54bd1..6bf81e06ac1d54ab6e104fe815cae27ab0cb05ba 100644 (file)
@@ -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;