-
Notifications
You must be signed in to change notification settings - Fork 44
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
base: main
Are you sure you want to change the base?
Conversation
Mind taking a look @mkruisselbrink? |
index.bs
Outdated
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=]. | ||
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. |
There was a problem hiding this comment.
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):
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. |
There was a problem hiding this comment.
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?
I guess we need to update spec-prod (or wait for the update to be propagated?):
|
I think #204 will fix that. |
Part of the changes discussed in #153 (comment)
This updates URL.revokeObjectURL to not allow revoking a Blob URL except from contexts with the same Storage Key as the one in which the Blob URL was created. A corresponding PR will update the Fetch spec to incorporate similar Storage Key checks into Blob URL fetches.
I considered incorporating the Storage Key checks into the "resolve a blob URL" algorithm instead, but it seemed that this would require an environment settings object to be available as part of https://url.spec.whatwg.org/#url-parsing, and I'm not sure whether that is the case / a change we want.
For normative changes, the following tasks have been completed:
Implementation commitment:
Preview | Diff