]> granicus.if.org Git - php/commitdiff
Probable fix for bug #19292
authorRasmus Lerdorf <rasmus@php.net>
Sat, 28 Sep 2002 16:10:43 +0000 (16:10 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Sat, 28 Sep 2002 16:10:43 +0000 (16:10 +0000)
main/fopen_wrappers.c

index 0d25142f2048f84493d21f4c89463ca0af14c038..00dec4e1008ac2f9492d3395e6bd2e333f1e505d 100644 (file)
@@ -199,8 +199,8 @@ PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC)
  */
 PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC)
 {
-       /* Only check when safe_mode on and safe_mode_include_dir is available */
-       if (PG(safe_mode) && PG(safe_mode_include_dir) &&
+       /* Only check when safe_mode or open_basedir is on and safe_mode_include_dir is available */
+       if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && PG(safe_mode_include_dir) &&
                        *PG(safe_mode_include_dir))
        {
                char *pathbuf;