diff --git a/ext/handle_svg/main.php b/ext/handle_svg/main.php index f8c8bef2..84eb19a6 100644 --- a/ext/handle_svg/main.php +++ b/ext/handle_svg/main.php @@ -67,6 +67,10 @@ class SVGFileHandler extends DataHandlerExtension protected function check_contents(string $file): bool { + if (getMimeType($file)!="image/svg+xml") { + return false; + } + $msp = new MiniSVGParser($file); return bool_escape($msp->valid); }