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

Monkey patch for non-cookie storage access #47

Merged
merged 7 commits into from
Jun 8, 2023

Conversation

amaliev
Copy link
Contributor

@amaliev amaliev commented Jun 7, 2023

We still need to confirm that "obtain a storage key" and its neighbors are the correct place to patch, which I will follow up on with WHATWG. Pushing this as a description of the algorithm's behavior, while the Storage spec patch location is being finalized.


Preview | Diff

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
Co-authored-by: Jeffrey Yasskin <[email protected]>
index.bs Outdated Show resolved Hide resolved
[=bounce tracking record/storage access set=].

</div>
1. Run [=process a navigation storage access for bounce tracking mitigations=] given <var ignore>request</var>.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason github is not showing me the steps for this algorithm anywhere, but I can see them in the preview.

The preview says that we are looking at the request's client. I think for this case we actually want reserved client instead:

https://fetch.spec.whatwg.org/#concept-request-reserved-client

The reserved client is the target container for the new document. The client is the container of the document that initiated the navigation. Sometimes they are the same (click a link in a tab to navigate the tab), but sometimes they are different (click a link that opens a new tab).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This algorithm was already written in the previous PR, it replaces "process a network cookie access for bounce tracking mitigations" since it looks like they're identical.

Makes sense, does that mean we want the same fix for cookie writes as well? It sounds like we should always use the request's "reserved client" when checking the destination navigable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"reserved client" is only used for document and iframe requests. Its confusing.

So maybe the cookie access thing needs to check one or the other depending on destination.

@wanderview wanderview merged commit bec418a into privacycg:main Jun 8, 2023
github-actions bot added a commit that referenced this pull request Jun 8, 2023
SHA: bec418a
Reason: push, by wanderview

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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