Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
edwinjm
· 2y ago · 0 comments
And what about SVG's with JavaScript? I once saw a security company reporting to disable user uploaded SVG's.
Comments
[–]
thomas34298
2y ago
JS in SVGs can be dangerous, but you can mitigate it using a CSP or by sending "Content-Disposition: attachment" so the file will be downloaded instead of being executed in your current browser context.
[–]
tracker1
2y ago
Fortunately svg and (x)HTML aren't too horrible in being able to sanitize scripts or if. The use of CSS's access notwithstanding.