Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CSP dynamic code compilation block #544

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,9 @@ anElement.innerHTML = trustedTypes.emptyHTML; // no need to create a policy
: <dfn>emptyScript</dfn>
:: is a {{TrustedScript}} object with its [=TrustedScript/data=] value set to an empty string.

Note: This object can be used to detect if the runtime environment has [[#csp-eval]]. While native Trusted Types implementation can
support `eval(TrustedScript)`, it is impossible for a polyfill to emulate that, as
eval(TrustedScript) will return its input without unwrapping and evaluating the code.
Note: This object can be used to detect if the runtime environment has support for dynamic code compilation.
While native Trusted Types implementation can support `eval(TrustedScript)`, it is impossible for a polyfill to
emulate that, as eval(TrustedScript) will return its input without unwrapping and evaluating the code.

<div class="example" id="empty-script-example">
<xmp highlight="js">
Expand Down Expand Up @@ -1483,10 +1483,6 @@ strings (|createdPolicyNames|), this algorithm returns `"Blocked"` if the
`"Blocked"`.
1. Return |result|.

### Support for dynamic code compilation ### {#csp-eval}

Note: See [https://github.com/w3c/webappsec-csp/pull/659](https://github.com/w3c/webappsec-csp/pull/659) which upstreams this integration.

# Security Considerations # {#security-considerations}

Trusted Types are not intended to protect access to [=injection sinks=] in an
Expand Down
Loading