diff options
| author | Stefan Esser <sesser@php.net> | 2002-03-17 20:54:57 +0000 |
|---|---|---|
| committer | Stefan Esser <sesser@php.net> | 2002-03-17 20:54:57 +0000 |
| commit | 6ac350d1b8c6adad4b26f766e57f403c4e4c6fc5 (patch) | |
| tree | a68b7fb75abad24e4dba301477ba4e50036d37d6 /ext/standard/basic_functions.c | |
| parent | c998e8137eab79088972ffc20f649bf00a343062 (diff) | |
| download | php-git-6ac350d1b8c6adad4b26f766e57f403c4e4c6fc5.tar.gz | |
move_uploaded_files checks open_basedir now
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 8033e577b8..b004fe0aa6 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2356,6 +2356,10 @@ PHP_FUNCTION(move_uploaded_file) if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(new_path), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { 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) { |
