From: Ilia Alshanetsky Date: Tue, 16 Mar 2004 23:23:17 +0000 (+0000) Subject: Fixed bug #27498 (bogus safe_mode error on nonexistent directories for X-Git-Tag: php-5.0.0RC1RC2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88058e57155703718c6f33c468beccfe45f75945;p=php Fixed bug #27498 (bogus safe_mode error on nonexistent directories for chdir() and opendir() functions). --- diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 9632445854..0d9bdfb90b 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -283,7 +283,7 @@ PHP_FUNCTION(chdir) RETURN_FALSE; } - if (PG(safe_mode) && !php_checkuid(str, NULL, CHECKUID_ALLOW_ONLY_FILE)) { + if (PG(safe_mode) && !php_checkuid(str, NULL, CHECKUID_CHECK_FILE_AND_DIR)) { RETURN_FALSE; } ret = VCWD_CHDIR(str); diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index c60063f355..b1b27f6049 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -856,7 +856,7 @@ static php_stream *php_plain_files_dir_opener(php_stream_wrapper *wrapper, char return NULL; } - if (PG(safe_mode) &&(!php_checkuid(path, NULL, CHECKUID_ALLOW_ONLY_FILE))) { + if (PG(safe_mode) &&(!php_checkuid(path, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { return NULL; }