]> granicus.if.org Git - php/commitdiff
move_uploaded_files checks open_basedir now
authorStefan Esser <sesser@php.net>
Sun, 17 Mar 2002 20:56:20 +0000 (20:56 +0000)
committerStefan Esser <sesser@php.net>
Sun, 17 Mar 2002 20:56:20 +0000 (20:56 +0000)
ext/standard/basic_functions.c

index 7c98613ccc08ec778ca15b03bfa681f52b29cefc..b0607df3eaebe4b5bb885768291e26c8a1343950 100644 (file)
@@ -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;