summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Fischer <mfischer@php.net>2002-05-20 17:18:18 +0000
committerMarkus Fischer <mfischer@php.net>2002-05-20 17:18:18 +0000
commit96bf2d1deba2e01c7dc9dd3439c292ff55cd85fb (patch)
treeaf95eed95a45a129e7b408de6afa2428a6613423
parent02a13a4ec494101ce9219650fbdc63dbf885aa69 (diff)
downloadphp-git-96bf2d1deba2e01c7dc9dd3439c292ff55cd85fb.tar.gz
- Add open_basedir check for all functions using php_stat() (filesize, stat,
etc), closes #11563.
-rw-r--r--ext/standard/filestat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index deb6605db9..5ddb64a173 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -553,6 +553,10 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
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);
if (!BG(CurrentStatFile) || strcmp(filename, BG(CurrentStatFile))) {