move_uploaded_files checks open_basedir now

This commit is contained in:
Stefan Esser 2002-03-17 20:56:20 +00:00
parent aab103e9fc
commit cce45de17c

View 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;