cvs: php4 /ext/standard filestat.c
| From: | Markus Fischer | Date: | Mon, 20 May 2002 17:18:19 +0000 |
| Subject: | cvs: php4 /ext/standard filestat.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12017@lists.php.net to get a copy of this message | ||
mfischer Mon May 20 13:18:19 2002 EDT
Modified files:
/php4/ext/standard filestat.c
Log:
- Add open_basedir check for all functions using php_stat() (filesize, stat,
etc), closes #11563.
Index: php4/ext/standard/filestat.c
diff -u php4/ext/standard/filestat.c:1.92 php4/ext/standard/filestat.c:1.93
--- php4/ext/standard/filestat.c:1.92 Wed May 15 21:07:21 2002
+++ php4/ext/standard/filestat.c Mon May 20 13:18:18 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filestat.c,v 1.92 2002/05/16 01:07:21 sniper Exp $ */
+/* $Id: filestat.c,v 1.93 2002/05/20 17:18:18 mfischer Exp $ */
#include "php.h"
#include "safe_mode.h"
@@ -552,6 +552,10 @@
int rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to other */
char *stat_sb_names[13]={"dev", "ino", "mode", "nlink",
"uid", "gid", "rdev",
"size", "atime", "mtime", "ctime",
"blksize", "blocks"};
+
+ if (php_check_open_basedir(filename)) {
+ RETURN_FALSE;
+ }
stat_sb = &BG(sb);