瀏覽代碼

fix: scanSVG incorrect ext reference (#4825)

NGPixel 3 年之前
父節點
當前提交
e84c15b926
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/models/assets.js

+ 1 - 1
server/models/assets.js

@@ -104,7 +104,7 @@ module.exports = class Asset extends Model {
       WIKI.config.uploads.scanSVG &&
       WIKI.config.uploads.scanSVG &&
       (
       (
         opts.mimetype.toLowerCase().startsWith('image/svg') ||
         opts.mimetype.toLowerCase().startsWith('image/svg') ||
-        opts.ext.toLowerCase() === 'svg'
+        fileInfo.ext.toLowerCase() === '.svg'
       )
       )
     ) {
     ) {
       const svgSanitizeJob = await WIKI.scheduler.registerJob({
       const svgSanitizeJob = await WIKI.scheduler.registerJob({