Files
servo/components/script
dyegoaurelio be58c968de script: Implement duplicate attribute check for CSP nonce validation (#43216)
Propagate the had_duplicate_attributes flag from html5ever's
ElementFlags through to the Element struct, enabling step 3 of the
CSP "is element nonceable" algorithm. Elements with duplicate
attributes are now correctly marked as "Not Nonceable", preventing
scripts with duplicate attributes from bypassing CSP nonce checks.

Testing: We still need https://github.com/servo/html5ever/issues/118 to
fully pass the
`content-security-policy/script-src/nonce-enforce-blocked.html` wpt
test. But I was able to uncomment some of the remaining tests on
`mozilla/csp/nonce-external-script-malformed-blocked.html`

---------

Signed-off-by: Dyego Aurélio <dyegoaurelio@gmail.com>
2026-03-17 19:37:40 +00:00
..
2025-10-02 07:51:19 +00:00