Skip to content
Snippets Groups Projects
Commit 2b96131b authored by Andre Yamin's avatar Andre Yamin
Browse files

Fix issue with Totara 13 XSS hardening

parent ca879351
No related branches found
No related tags found
No related merge requests found
...@@ -316,6 +316,10 @@ function hvp_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload ...@@ -316,6 +316,10 @@ function hvp_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload
return false; // No such file. return false; // No such file.
} }
// Totara: use allowxss option to prevent application/x-javascript mimetype
// from being converted to application/x-forcedownload.
$options['allowxss'] = '1';
send_stored_file($file, 86400, 0, $forcedownload, $options); send_stored_file($file, 86400, 0, $forcedownload, $options);
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment