From 508d4a0d14a87c2dda7ccaeba90b56c8d5d0552b Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 14 Aug 2006 20:08:52 +0000 Subject: [PATCH] adding proper checks that the requested help file exists SC#292; merged from MOODLE_16_STABLE --- help.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/help.php b/help.php index e24b616087..ef420dfd27 100644 --- a/help.php +++ b/help.php @@ -56,9 +56,9 @@ } } - if (file_exists($filepath)) { + if (file_exists($filepath) and is_file($filepath) and is_readable($filepath)) { $helpfound = true; - include($filepath); // The actual helpfile + @include($filepath); // The actual helpfile if ($module == 'moodle' and ($file == 'index.html' or $file == 'mods.html')) { // include file for each module -- 2.39.5