cvs: php4(PHP_4_0_6) /ext/standard file.c
| From: | Rasmus Lerdorf | Date: | Sun, 20 May 2001 13:28:57 +0000 |
| Subject: | cvs: php4(PHP_4_0_6) /ext/standard file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5870@lists.php.net to get a copy of this message | ||
rasmus Sun May 20 06:28:57 2001 EDT
Modified files: (Branch: PHP_4_0_6)
/php4/ext/standard file.c
Log:
MFH of patch that fixes copy() ignoring safe_mode open_basedir setting.
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.156.2.1 php4/ext/standard/file.c:1.156.2.2
--- php4/ext/standard/file.c:1.156.2.1 Sat May 19 00:43:25 2001
+++ php4/ext/standard/file.c Sun May 20 06:28:57 2001
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.156.2.1 2001/05/19 07:43:25 sas Exp $ */
+/* $Id: file.c,v 1.156.2.2 2001/05/20 13:28:57 rasmus Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -1877,7 +1877,15 @@
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;
}