From 2bc288bb0c8e996fb08cb6603b578c77cc01f803 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 20 Feb 2004 01:09:00 +0000 Subject: [PATCH] Added missing safe_mode & open_basedir checks. --- ext/dio/dio.c | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- 2.50.1