From 02e6cd022aa114c346815f2f66d2b759fc15715b Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Fri, 26 Jul 2002 08:04:42 +0000 Subject: [PATCH] all functions based on php_stat are now safe mode aware... --- ext/standard/filestat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 382847344a..2218e59b43 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 (PG(safe_mode) &&(!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + if (php_check_open_basedir(filename TSRMLS_CC)) { RETURN_FALSE; } -- 2.40.0