From 9ac333f624aa477e6b47099fd3df3aca8a32fe29 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 16 May 2006 00:40:36 +0000 Subject: [PATCH] MFB: Disable realpath cache when open_basedir or safe_mode are enabled on a per-request basis. --- main/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/main.c b/main/main.c index d67a80155b..0fc8da9940 100644 --- a/main/main.c +++ b/main/main.c @@ -1197,6 +1197,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(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); } -- 2.50.1