From 72b489ef65529435aa045c1cee580acd65886245 Mon Sep 17 00:00:00 2001 From: Michael Aherne Date: Thu, 26 Jan 2017 10:45:52 +0000 Subject: [PATCH] MDL-57777 rss: Return 404 when context not found. --- rss/file.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rss/file.php b/rss/file.php index b0bd7a2b8ec..7073843fd4c 100644 --- a/rss/file.php +++ b/rss/file.php @@ -115,7 +115,11 @@ if ($token === "$inttoken") { } // Check the context actually exists. -list($context, $course, $cm) = get_context_info_array($contextid); +try { + list($context, $course, $cm) = get_context_info_array($contextid); +} catch (Exception $e) { + rss_error(); +} $PAGE->set_context($context);