mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'MDL-72242-311-svgforcedfilter' of git://github.com/mudrd8mz/moodle into MOODLE_311_STABLE
This commit is contained in:
commit
9bcac8370b
1 changed files with 1 additions and 2 deletions
|
@ -2529,10 +2529,9 @@ function send_file($path, $filename, $lifetime = null , $filter=0, $pathisstring
|
|||
$filename = rawurlencode($filename);
|
||||
}
|
||||
|
||||
// We need to force download and force filter the file content for the SVG file.
|
||||
// Make sure we force download of SVG files for security reasons (https://digi.ninja/blog/svg_xss.php).
|
||||
if (file_is_svg_image_from_mimetype($mimetype)) {
|
||||
$forcedownload = true;
|
||||
$filter = 1;
|
||||
}
|
||||
|
||||
if ($forcedownload) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue