diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-10-13 01:42:20 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-10-13 01:42:20 +0000 |
| commit | bc59416ff2c2729abd941c69b0911e8aa31b4572 (patch) | |
| tree | 1fd68444f63f9c5de139379dd4d047bcd16d4a49 /ext/standard/basic_functions.c | |
| parent | 8bd16e2b5890b6006d8362da0acb615053352ec7 (diff) | |
| download | php-git-bc59416ff2c2729abd941c69b0911e8aa31b4572.tar.gz | |
Fixed bug #38934 (move_uploaded_file() cannot read uploaded file outside of
open_basedir).
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 720c532ae1..1b31e9bf82 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -6032,8 +6032,7 @@ PHP_FUNCTION(move_uploaded_file) VCWD_UNLINK(Z_STRVAL_PP(new_path)); if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) { successful = 1; - } else - if (php_copy_file(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path) TSRMLS_CC) == SUCCESS) { + } else if (php_copy_file_ex(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path), STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { VCWD_UNLINK(Z_STRVAL_PP(path)); successful = 1; } |
