w3c / FileAPI

File API
https://w3c.github.io/FileAPI/
Other
106 stars 44 forks source link

Partition Blob URL revocation by Storage Key #201

Open recvfrom opened 1 month ago

recvfrom commented 1 month ago

Part of the changes discussed in https://github.com/w3c/FileAPI/issues/153#issuecomment-2330085478

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

miketaylr commented 2 weeks ago

Mind taking a look @mkruisselbrink?

miketaylr commented 1 week ago

I guess we need to update spec-prod (or wait for the update to be propagated?):

  $ bikeshed update
    Bikeshed now requires Python 3.9; you are on 3.8.10.
        If you're seeing this message in your CI run, you are
        likely specifying an old OS; try `ubuntu-latest`.
        If you're seeing this on the command line, see the docs
        for instructions:
        https://speced.github.io/bikeshed/#installing
  Command `bikeshed update` failed with exit code: 1.

https://github.com/w3c/spec-prod/pull/193

mkruisselbrink commented 1 week ago

I guess we need to update spec-prod (or wait for the update to be propagated?):

  $ bikeshed update
    Bikeshed now requires Python 3.9; you are on 3.8.10.
        If you're seeing this message in your CI run, you are
        likely specifying an old OS; try `ubuntu-latest`.
        If you're seeing this on the command line, see the docs
        for instructions:
        https://speced.github.io/bikeshed/#installing
  Command `bikeshed update` failed with exit code: 1.

w3c/spec-prod#193

I think https://github.com/w3c/FileAPI/pull/204 will fix that.

recvfrom commented 5 days ago

Per the feedback here [1], I've updated this PR to also change how the blob URL entry's object member is exposed so that the partitioning checks can be fully contained in the FileAPI. WDYT?

[1] https://github.com/whatwg/fetch/pull/1783#issuecomment-2493209801