From: Stefan Esser Date: Sun, 28 Jul 2002 18:39:48 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.2.3RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02dafdc9b0a67c296f5fe19a708fa99d777c0372;p=php MFH --- diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index deb6605db9..fcf5e583e8 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -553,6 +553,14 @@ 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 (PG(safe_mode) &&(!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(filename TSRMLS_CC)) { + RETURN_FALSE; + } + stat_sb = &BG(sb); if (!BG(CurrentStatFile) || strcmp(filename, BG(CurrentStatFile))) {