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

Partition Blob URL revocation by Storage Key #201

Merged
merged 9 commits into from
Dec 4, 2024
12 changes: 6 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@ run the following steps:
## Dereferencing Model for blob URLs ## {#requestResponseModel}

<div algorithm="resolveURL">
To <dfn export id=blob-url-resolve>resolve a blob URL</dfn> given a [=URL=] |url|:
To <dfn export id=blob-url-resolve lt="resolve a blob URL|resolving the blob URL">resolve a blob URL</dfn> given a [=URL=] |url|:

1. [=Assert=]: |url|'s [=url/scheme=] is "`blob`".
1. Let |store| be the user agent's [=blob URL store=].
Expand Down Expand Up @@ -1630,11 +1630,11 @@ return the result of [=adding an entry to the blob URL store=] for |obj|.
<div algorithm="revokeObjectURL">
The <dfn method for=URL id="dfn-revokeObjectURL">revokeObjectURL(|url|)</dfn> static method must run these steps:

1. Let |url record| be the result of [=URL parser|parsing=] |url|.
1. If |url record|'s [=url/scheme=] is not "`blob`", return.
1. Let |origin| be the [=url/origin=] of |url record|.
1. Let |settings| be the [=current settings object=].
1. If |origin| is not [=same origin=] with |settings|'s [=environment settings object/origin=], return.
1. Let |entry| be the result of [=resolving the blob URL=] |url|.
recvfrom marked this conversation as resolved.
Show resolved Hide resolved
1. If |entry| is failure, return.
1. Let |blobStorageKey| be the result of [=obtaining a storage key for non-storage purposes=] with |entry|'s [=environment settings object=].
recvfrom marked this conversation as resolved.
Show resolved Hide resolved
1. Let |currentStorageKey| be the result of [=obtaining a storage key for non-storage purposes=] with the [=current settings object=].
1. If |blobStorageKey| is not [=storage key/equal=] to |currentStorageKey|, return.
1. [=Remove an entry from the Blob URL Store=] for |url|.

Note: This means that rather than throwing some kind of error, attempting to revoke a URL that isn't registered will silently fail.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might make sense to mention that it's not just URLs that aren't registered that would silently fail, something like (although not sure that's the best way to phrase it):

Suggested change
Note: This means that rather than throwing some kind of error, attempting to revoke a URL that isn't registered will silently fail.
Note: This means that rather than throwing some kind of error, attempting to revoke a URL that isn't registered, or is registered from a different storage key, will silently fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I updated this (although made it a bit more verbose). WDYT?

Expand Down
Loading