Skip to content

Commit 07f93c5

Browse files
authored
Merge pull request #57 from jalonthomas/update_permission_key_generation
Align the spec with new permission key generation algorithm
2 parents 092b7ae + 8b4136e commit 07f93c5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

index.bs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,11 @@ The requestStorageAccessFor API defines a [=powerful feature=] identified by the
189189
<dt>[=powerful feature/permission key generation algorithm=]</dt>
190190
<dd>
191191
<div algorithm='top-level-storage-access-key-generation'>
192-
To generate a new [=permission key=] for the "<a permission><code>top-level-storage-access</code></a>" feature, given an [=environment settings object=] |settings|, run the following steps:
193-
1. Let |current origin| be |settings|' [=environment settings object/origin=].
194-
1. If |current origin| is not [=same site=] with |settings|' [=top-level origin=], return null.
195-
1. Return the result of [=obtain a site|obtaining a site=] from |settings|' [=top-level origin=].
192+
To generate a new [=permission key=] for the "<a permission><code>top-level-storage-access</code></a>" feature, given an [=/origin=] |origin| and [=/origin=] |embedded origin|, run the following steps:
193+
1. If |embedded origin| is not [=same site=] with |origin|, return null.
194+
1. Return the result of [=obtain a site|obtaining a site=] from |origin|.
196195

197-
Note: the check for whether |settings|' [=environment settings object/origin=] is [=same site=] with |settings|' [=top-level origin=] is intended to disallow permission queries from cross-site frames.
196+
Note: the check for whether |embedded origin| is [=same site=] with |origin| is intended to disallow permission queries from cross-site frames.
198197
This depends on the invariant that `top-level-storage-access` permission requests are only allowed in a [=top-level browsing context=]. As such, this check is only relevant in {{Permissions/query(permissionDesc)}}.
199198

200199
</div>

0 commit comments

Comments
 (0)