2 ms·
For developers, the key is this: > organizations should consider implementing a content security policy (CSP) into the application [and] avoid directives such
by dwheeler 5y ago
For developers, the key is this:
> organizations should consider implementing a content security policy (CSP) into the application [and] avoid directives such as
unsafe-inline or unsafe-eval
The problem with countering cross-site scripting is that you have to be absolutely perfect in the massive number of output locations. It is a good idea to try, and to use a framework that automatically escapes things properly. But CSP works every time, without requiring perfection.
- bawolff 5y agoI would also say that in addition to csp being awesome, escaping user controllled output is generally safer (when practical) than trying to parse and sanitize html, due to how tricky html is.