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

Correct orphaned variable sandboxFlags to use targetSnapshotParams. #8512

Merged
merged 2 commits into from
Nov 17, 2022

Conversation

jeremyroman
Copy link
Collaborator

@jeremyroman jeremyroman commented Nov 15, 2022

Fixes #8511. This change is editorial.


/browsing-the-web.html ( diff )

@jeremyroman
Copy link
Collaborator Author

@domenic PTAL?

@domenic
Copy link
Member

domenic commented Nov 16, 2022

I think it should be finalSandboxFlags? If the page's response headers contain CSP: sandbox, the logic

This results in a network error as one cannot simultaneously provide a clean slate to a response using cross-origin opener policy and sandbox the result of navigating to that response.

still seems like it should apply.

@jeremyroman
Copy link
Collaborator Author

If so there was (probably?) an existing bug before #6315.

The previous revision (0a97a81^) used sandboxFlags (rather than finalSandboxFlags), which was plumbed in as an input to process a navigate fetch.

I admit that state didn't make a ton of sense to me and finalSandboxFlags seems to be more natural. The difference would be in the case where the response explicitly did something like:

Content-Security-Policy: sandbox
Cross-Origin-Opener-Policy: same-origin

Are you confident that it should be finalSandboxFlags, or should we try to find someone who knows CSP/COOP to confirm?

@domenic
Copy link
Member

domenic commented Nov 17, 2022

I was pretty confident, and then I went to check that we have tests, and now I'm very confident: https://github.com/web-platform-tests/wpt/blob/b52cec844a/html/cross-origin-opener-policy/coop-csp-sandbox.https.html :)

@domenic domenic merged commit 0cd1975 into whatwg:main Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

sandboxFlags is never defined in "create navigation params by fetching"
2 participants