diff --git a/mod/quiz/quizfile.php b/mod/quiz/quizfile.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/quizfile.php
+++ b/mod/quiz/quizfile.php
@@ -41,6 +41,9 @@
     if (! ($filename = $regs[5])) {
         error("No valid file name supplied");
     }
+    if (detect_munged_arguments($relativefilepath)) {
+        error("Errors in the supplied file path");
+    }
 
     //////////////////////////////////////////
     // Info from $pathinfo is now extracted!
Merged fix SC<I> from STABLE, even though this file will be rewritten
with Petr's new file handling soon!  :-)