mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Added missing open_basedir checks
This commit is contained in:
parent
17ff2f42ff
commit
7ba84b8807
1 changed files with 7 additions and 0 deletions
|
@ -251,6 +251,13 @@ PS_OPEN_FUNC(files)
|
||||||
if (*save_path == '\0') {
|
if (*save_path == '\0') {
|
||||||
/* if save path is an empty string, determine the temporary dir */
|
/* if save path is an empty string, determine the temporary dir */
|
||||||
save_path = php_get_temporary_directory();
|
save_path = php_get_temporary_directory();
|
||||||
|
|
||||||
|
if (PG(safe_mode) && (!php_checkuid(save_path, NULL, CHECKUID_ALLOW_ONLY_DIR))) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
if (php_check_open_basedir(save_path TSRMLS_CC)) {
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* split up input parameter */
|
/* split up input parameter */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue