mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
move_uploaded_files checks open_basedir now
This commit is contained in:
parent
aab103e9fc
commit
cce45de17c
1 changed files with 4 additions and 0 deletions
|
@ -2359,6 +2359,10 @@ PHP_FUNCTION(move_uploaded_file)
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (php_check_open_basedir(Z_STRVAL_PP(new_path) TSRMLS_CC)) {
|
||||||
|
RETURN_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
VCWD_UNLINK(Z_STRVAL_PP(new_path));
|
VCWD_UNLINK(Z_STRVAL_PP(new_path));
|
||||||
if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) {
|
if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) {
|
||||||
successful = 1;
|
successful = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue