From cce45de17c61bde089e7036ba4b3009a1f599a3b Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Sun, 17 Mar 2002 20:56:20 +0000 Subject: [PATCH] move_uploaded_files checks open_basedir now --- ext/standard/basic_functions.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 7c98613ccc..b0607df3ea 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2359,6 +2359,10 @@ PHP_FUNCTION(move_uploaded_file) RETURN_FALSE; } + if (php_check_open_basedir(Z_STRVAL_PP(new_path) TSRMLS_CC)) { + RETURN_FALSE; + } + VCWD_UNLINK(Z_STRVAL_PP(new_path)); if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) { successful = 1; -- 2.50.1