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

Update explainer: Add 'Sec-' prefix to request header #120

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

pythagoraskitty
Copy link
Collaborator

@pythagoraskitty pythagoraskitty commented Oct 20, 2023

The request header added to requests that are eligible to write to shared storage via response header ought to be a "forbidden header" according to the Fetch specification, i.e. a header that JS cannot add or modify.

We were using Shared-Storage-Writable as the name of the request header, which was not a forbidden header and could be modified by JS.

This commit updates the explainer to add the prefix Sec- in order to make this header forbidden. The new request header attached to eligible outgoing requests will be Sec-Shared-Storage-Writable: ?1.

We will update the specification draft accordingly in #121.

The request header added to requests that are eligible to write to shared storage via response header ought to be a "forbidden header" according to the [Fetch specification](https://fetch.spec.whatwg.org/#forbidden-request-header), i.e. a header that JS cannot add or modify.

We were using `Shared-Storage-Writable` as the name of the request header, which was not a forbidden header and could be modified by JS.

This commit adds the prefix `Sec-` in order to make this header forbidden, updating to using to using `Sec-Shared-Storage-Writable` as the header
name.
@pythagoraskitty
Copy link
Collaborator Author

@xyaoinum PTAL, thanks!

pythagoraskitty added a commit that referenced this pull request Oct 20, 2023
The request header added to requests that are eligible to write to shared storage via response header ought to be a "forbidden header" according to the [Fetch specification](https://fetch.spec.whatwg.org/#forbidden-request-header), i.e. a header that JS cannot add or modify.

We were using `Shared-Storage-Writable` as the name of the request header, which was not a forbidden header and could be modified by JS.

This commit is a followup to #120 and updates the specification draft to add the prefix `Sec-` in order to make this header forbidden. The new request header attached to eligible outgoing requests will be `Sec-Shared-Storage-Writable: ?1`.
@pythagoraskitty pythagoraskitty merged commit b2e618c into main Oct 20, 2023
1 check passed
@pythagoraskitty pythagoraskitty deleted the cammie-branch1 branch October 20, 2023 20:45
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.

None yet

2 participants