From: Ilia Alshanetsky Date: Fri, 20 Feb 2004 01:09:00 +0000 (+0000) Subject: Added missing safe_mode & open_basedir checks. X-Git-Tag: RELEASE_0_2_0~261 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bc288bb0c8e996fb08cb6603b578c77cc01f803;p=php Added missing safe_mode & open_basedir checks. --- diff --git a/ext/dio/dio.c b/ext/dio/dio.c index e0bc400b4c..fcd171c1c8 100644 --- a/ext/dio/dio.c +++ b/ext/dio/dio.c @@ -159,6 +159,10 @@ PHP_FUNCTION(dio_open) return; } + if (php_check_open_basedir(file_name TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(file_name, "wb+", CHECKUID_CHECK_MODE_PARAM))) { + RETURN_FALSE; + } + if (ZEND_NUM_ARGS() == 3) { fd = open(file_name, flags, mode); } else {