mirror of
https://github.com/php/php-src.git
synced 2026-04-09 09:03:04 +02:00
Fix bug #9526
This commit is contained in:
@@ -1894,10 +1894,18 @@ PHP_FUNCTION(copy)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir((*source)->value.str.val)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (PG(safe_mode) &&(!php_checkuid((*target)->value.str.val, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (php_check_open_basedir((*target)->value.str.val)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (php_copy_file(Z_STRVAL_PP(source), Z_STRVAL_PP(target))==SUCCESS) {
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user