diff options
-rw-r--r-- | ext/dio/dio.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 { |