2
0
Эх сурвалжийг харах

Merge pull request #2688 from weseek/fix/protecting-against-XSS-in-SVG

Fix/protecting against xss in svg
Yuki Takei 5 жил өмнө
parent
commit
489f874cf9

+ 4 - 1
src/server/routes/attachment.js

@@ -228,7 +228,10 @@ module.exports = function(crowi, app) {
     }
     // reference
     else {
-      res.set('Content-Type', attachment.fileFormat);
+      res.set({
+        'Content-Type': attachment.fileFormat,
+        'Content-Security-Policy': "script-src 'unsafe-hashes'",
+      });
     }
   }