summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-08-10 21:49:56 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-08-10 21:49:56 +0000
commit944e948c96e08cb3501729d038e7049c6444b53d (patch)
treecff823cff23aadc9bac057081fc7128e8a08f182
parentdea7cce627055160493885da06c157be5cd9e177 (diff)
downloadphp-git-944e948c96e08cb3501729d038e7049c6444b53d.tar.gz
disable realpath cache for safe_mode & open_basedir
-rw-r--r--main/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c
index a22922d387..bfc373df77 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1091,6 +1091,11 @@ int php_request_startup(TSRMLS_D)
zend_set_timeout(PG(max_input_time));
}
+ /* Disable realpath cache if safe_mode or open_basedir are set */
+ if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
+ CWDG(realpath_cache_size_limit) = 0;
+ }
+
if (PG(expose_php)) {
sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1);
}