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

Adapt to policy container #1588

Merged
merged 1 commit into from
May 5, 2021
Merged

Conversation

antosart
Copy link
Member

@antosart antosart commented Apr 27, 2021

This is a companion PR to whatwg/html#6504, which adds the concept of a policy container and attaches it to the environment settings object and the WorkerGlobalScope. This PR correctly initializes the policy container of the underlying WorkerGlobalScope of a ServiceWorkerGlobalScope.


Preview | Diff

@antosart antosart mentioned this pull request Apr 27, 2021
3 tasks
annevk pushed a commit to whatwg/html that referenced this pull request May 3, 2021
This change adds the policy container concept. See also https://github.com/antosart/policy-container-explained. A policy container serves as collection of policies to be applied to a document, WorkerGlobalScope, or WorkletGlobalScope. Its purpose is to simplify how policies are initialized and inherited.

Policies are populated by parsing headers and/or meta elements. A policy container can be cloned, hence supporting inheritance of policies. Initially a policy container only contains a CSP list.

This is not meant to be a behavioral change, but rather a refactoring. Small behavioral changes introduced by this change (for example storing and reloading policies from history) address what are usually considered to be bugs in the standard/implementation (which often turn out to be security vulnerabilities).

CSP PR: w3c/webappsec-csp#482.

Service Worker PR: w3c/ServiceWorker#1588.

Helps with #4926.
@jakearchibald jakearchibald merged commit 49a746d into w3c:main May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants