HtmlUnit / htmlunit-csp

Apache License 2.0
2 stars 1 forks source link

Add support for trusted-types and require-trusted-types #4

Open kingthorin opened 9 months ago

kingthorin commented 9 months ago

It would be nice to have handling for: the trusted-types trusted-types and require-trusted-types-for require-trusted-types-for directives.

This advice was provided pre-fork:


The process will be basically

The main challenges in my experience is figuring out what the spec is trying to say and whether that's actually what browsers do. For example, it says the syntax is defined by an ABNF, which means keywords are case-insensitive ("ABNF strings are case insensitive"). So per spec, 'ALLow-DUPlicATES' is a legal way to write 'allow-duplicates'. Is that actually intentional? Is that what browsers do? Gotta check. Similarly, are policy names case-sensitive or not? That affects the representation and especially the manipulation of those Values.

kingthorin commented 9 months ago

FYI @zaproxy is now using this library :grinning: https://github.com/zaproxy/zap-extensions/pull/5231