In the Anarki repo, I noticed this comment above the `js-ext` in `lib/html.arc`: ; for strict CSP rules, inline code is allowed if the SHA-256 hash is included
; in the CSP headers. So it's better to either not restrict inline code, or
; move all javascript to an external file, including event binding.
From this I understand that a strict content security policy would disallow inline JavaScript unless a hash is provided in the headers, presumably because otherwise it could potentially be modified by an attacker.I don't know what the risk is for these kind of attacks, but if we assume that inline JavaScript is bad and getting rid of it is good: - Should it be disallowed in CSP rules in Arc? - Does this mean that `votelink` should be modified to not use the `onclick` attribute? |