diff --git a/server/models/assets.js b/server/models/assets.js index 8548319f..9d0a79b1 100644 --- a/server/models/assets.js +++ b/server/models/assets.js @@ -100,7 +100,13 @@ module.exports = class Asset extends Model { } // Sanitize SVG contents - if (WIKI.config.uploads.scanSVG && opts.mimetype === 'image/svg+xml') { + if ( + WIKI.config.uploads.scanSVG && + ( + opts.mimetype.toLowerCase().startsWith('image/svg') || + opts.ext.toLowerCase() === 'svg' + ) + ) { const svgSanitizeJob = await WIKI.scheduler.registerJob({ name: 'sanitize-svg', immediate: true,