From 6ac350d1b8c6adad4b26f766e57f403c4e4c6fc5 Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Sun, 17 Mar 2002 20:54:57 +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 8033e577b8..b004fe0aa6 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2356,6 +2356,10 @@ PHP_FUNCTION(move_uploaded_file) if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(new_path), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { 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) { -- 2.50.1