diff options
| author | Romolo Manfredini <romolo@php.net> | 2001-03-28 09:01:27 +0000 |
|---|---|---|
| committer | Romolo Manfredini <romolo@php.net> | 2001-03-28 09:01:27 +0000 |
| commit | 2b82b1c47a34a1f236c72800eaea54a2c0e58566 (patch) | |
| tree | e2b39283371deda835013f5f98bab34a9a2f9e59 | |
| parent | daf68d8d91d54b89efdcb7e1280abdb332968534 (diff) | |
| download | php-git-2b82b1c47a34a1f236c72800eaea54a2c0e58566.tar.gz | |
Safe mode check for target introduced in function copy. Pls insert in 4_0_5
| -rw-r--r-- | ext/standard/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c index 2808d41a6b..0db94098ee 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1703,6 +1703,10 @@ PHP_FUNCTION(copy) RETURN_FALSE; } + if (PG(safe_mode) &&(!php_checkuid((*target)->value.str.val, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + if (php_copy_file(Z_STRVAL_PP(source), Z_STRVAL_PP(target))==SUCCESS) { RETURN_TRUE; } else { |
