Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(share): one more missing SVG CSP handling
Elian Doranda5669c3a0b7
diff --git a/apps/server/src/share/routes.ts b/apps/server/src/share/routes.tsindex bbd2111e03..84ba0c7c37 100644--- a/apps/server/src/share/routes.ts+++ b/apps/server/src/share/routes.ts@@ -112,7 +112,8 @@ function renderImageAttachment(image: SNote, res: Response, attachmentName: striconst svg = utils.sanitizeSvg(svgString);res.set("Content-Type", "image/svg+xml");res.set("Cache-Control", "no-cache, no-store, must-revalidate");- res.set("Content-Security-Policy", "script-src 'none'");+ res.set("Content-Security-Policy", utils.SVG_CONTENT_SECURITY_POLICY);+ res.set("X-Content-Type-Options", "nosniff");res.send(svg);}