Shared Storage: Allow writes from headers in all sandboxed frames #46233
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, writing to shared storage via response headers by way of
a fetch or image request would work inside a sandboxed iframe only if
the iframe had sandbox flag "allow-same-origin". We remove this
unnecessary restriction by correcting the origin used for the
opaqueness check for sharedStorageWritable image and fetch requests:
instead of checking the environment's origin for opaqueness, we now
check the request's origin for opaqueness in order to determine
eligibility for the 'Sec-Shared-Storage-Writable' request header.
See WICG/shared-storage#155 for the related
specification fix.
Bug: 339172115
Change-Id: Ia3d048c8441bb99ea48d3943c55fe83c943bcadf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527770
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Yao Xiao <yaoxia@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303509}