summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-05-19 22:50:44 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-05-19 22:50:44 +0000
commitae3dda82856b772da28424e229b29b07b2c95da4 (patch)
treee9c5a08135d6a2cb4459d396a39c2b15fa7e88c7 /ext/standard
parent16b94858b6acf8e45e35d0e69b12e9ed462d3a42 (diff)
downloadphp-git-ae3dda82856b772da28424e229b29b07b2c95da4.tar.gz
Fix bug #9526
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index a395ab29ce..f86be131eb 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -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 {