From 9f39874ec5a80b15b0a4d49129e3eb7a4b2ee5cf Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 15 Jan 2004 07:52:21 +0000 Subject: [PATCH] Double-check bad input data --- course/log.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/course/log.php b/course/log.php index 3575f5c348..bfcc979ea2 100644 --- a/course/log.php +++ b/course/log.php @@ -52,8 +52,10 @@ $modname = $urlparts[0]; $modparts = split('.php\?id=', $urlparts[1]); if (count($modparts) == 2) { - $modpage = $modparts[0]; - $modid = $modparts[1]; + if (record_exists('course_modules', 'id', $modparts[1], 'course', $course->id)) { + $modpage = $modparts[0]; + $modid = $modparts[1]; + } } } } -- 2.39.5