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

Let document.hasStorageAccess check whether the Document already has unpartitioned data access #174

Merged
merged 21 commits into from
Aug 21, 2023
Merged
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion storage-access.bs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,15 @@ When invoked on {{Document}} |doc|, the <dfn export method for=Document><code>ha

ISSUE: "same authority" here is a placeholder for a future concept that allows user agents to perform [=same site=] checks while adhering to additional security aspects such as the presence of a cross-site parent document, see [whatwg/storage#142](https://github.com/whatwg/storage/issues/142#issuecomment-1122147159). In practice, this might involve comparing the [=site for cookies=] or performing a [=same site=] check with the top-level document.

1. [=Queue a global task=] on the [=permissions task source=] given |global| to [=/resolve=] |p| with |global|'s [=environment/has storage access=].
1. Run the following steps [=in parallel=]:
1. Let <dfn>whether the user agent allows unpartitioned cookie access</dfn> be an algorithm that, given a user agent's settings object |user agent settings| and a [=boolean=] |has per-frame storage access|, runs the following steps:
shuranhuang marked this conversation as resolved.
Show resolved Hide resolved
1. [=Queue a global task=] on the [=permission task source=] given |global| to:
1. If |has per-frame storage access| is false:
1. If |user agent settings| allows unpartitioned cookie access, [=/resolve=] |p| with true and return |p|.
shuranhuang marked this conversation as resolved.
Show resolved Hide resolved
1. If |user agent settings| disallows unpartitioned cookie access, [=/resolve=] |p| with false and return |p|.
1. [=/Resolve=] |p| with true and return |p|.
1. Let |user agent settings| be user agent's settings.
1. Run <a href="#whether-the-user-agent-allows-unpartitioned-cookie-access">whether the user agent allows unpartitioned cookie access</a> with |user agent settings| and |global|'s [=environment/has storage access=].
shuranhuang marked this conversation as resolved.
Show resolved Hide resolved
1. Return |p|.

When invoked on {{Document}} |doc|, the <dfn export method for=Document><code>requestStorageAccess()</code></dfn> method must run these steps:
Expand Down