←back to thread

72 points _vvhw | 1 comments | | HN request time: 0.001s | source
Show context
zawerf ◴[] No.21069377[source]
I am always irrationally(?) scared of using these sanitizers despite their successful history. As soon as new html/js/css syntax/features are introduced, won't your security model need to be reevaluated? Which seems like a lost cause at the rate new capabilities are introduced to the web. E.g., when CSS Shaders lands, you might be able to execute arbitrary gpu code with just css (hypothetically speaking, I don't actually know how it will work. I am sure it'll be sandboxed pretty well. But the problem remains that there are too many new possibilities to keep up with!).
replies(4): >>21069454 #>>21069510 #>>21069644 #>>21071017 #
1. _vvhw ◴[] No.21069510[source]
DOMPurify (as a client-side sanitizer) uses a whitelist. There's also CSP for defense-in-depth.

I would be more concerned of using server-side sanitizers due to the impedance mismatch between client/server HTML parsing algorithms.