mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
Implement trusted types url setter (#36596)
We now check the sink of script.src for trusted types. This is the first attribute that we check, other sinks will be implemented in follow-up changes. The algorithms currently hardcode various parts. That's because I need to refactor a couple of algorithms already present in TrustedTypePolicy. They use callbacks at the moment, which made sense for their initial use. However, for these new algorithms they don't work. Therefore, I will align them with the specification by taking in an enum. However, since that's a bigger refactoring, I left that out of this PR (which is already quite big). The other trusted types support (createScript and createHTML) will also be implemented separately. Part of #36258 --------- Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com> Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
fee2ea34af
commit
6bb087e381
27 changed files with 233 additions and 74 deletions
|
@ -1,3 +0,0 @@
|
|||
[script-src-1_10.html]
|
||||
[Test that securitypolicyviolation event is fired]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[script-src-strict_dynamic_double_policy_different_nonce.html]
|
||||
[Unnonced script injected via `appendChild` is not allowed with `strict-dynamic` + a nonce-only double policy.]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue