Blob isolation causes downloads to fail from extension pages embedded in partitioned iframes
Categories
(WebExtensions :: General, defect, P3)
Tracking
(firefox-esr115 unaffected, firefox-esr128 affected, firefox130 wontfix, firefox131 wontfix, firefox132 wontfix, firefox133 wontfix)
People
(Reporter: andrews54757, Unassigned)
References
(Depends on 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
3.31 MB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Steps to reproduce:
Firefox Developer Edition 131.0 Beta 4 (20240909091655)
- Manually install faststream video player extension V1.3.26 from the provided file
- Go to https://faststream.online/bugs/firefox-blob-isolation
- Click extension icon, the video should be replaced with a custom player.
- Click the download icon to save the video to an MP4
Actual results:
File save fails silently
Expected results:
File save should occur
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Related FastStream issue on Github: https://github.com/Andrews54757/FastStream/issues/235
Comment 5•7 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::File Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Test page without sandbox set, to demonstrate that it works normally there: https://faststream.online/bugs/firefox-blob-isolation-working
My apologies, it appears like my reproduction methods were incorrect. After some investigation, I discovered that the problem stems from partitioned iframes, not sandboxes. Here are updated instructions for reproducing the issue:
- Download
firefox-faststream-partition-bug.zip
and install as temporary extension in Firefox Developer Edition - Go to https://faststream.online/bugs/firefox-blob-isolation-test
- Enable the extension by clicking on the icon
- The player should be replaced. Click the download/save icon in the bottom right corner.
- The download will fail with the error
Cannot access blob URL “blob:moz-extension://...” with a different partition key.
Updated•6 months ago
|
Comment 9•6 months ago
|
||
Not sure whether/how add-on APIs are supposed to respond to the partitioning here, but over to webextensions for initial investigation, as this is all before any downloads/file handling code gets its hands on anything.
Comment 10•6 months ago
|
||
:abhishekmadan, since you are the author of the regressor, bug 1843155, could you take a look?
For more information, please visit BugBot documentation.
Comment 11•6 months ago
|
||
(In reply to :Gijs (he/him) from comment #9)
Not sure whether/how add-on APIs are supposed to respond to the partitioning here
That is yet to be defined. In bug 1698863 I collected some issues around partitioning in the downloads.download
API. We probably need some new properties to enable extensions to describe the partition to use. I'll also discuss this with other browser vendors at TPAC 2024 (https://github.com/w3c/webextensions/issues/659#issuecomment-2354057779).
An alternative solution would be for the extension implementation to query for the partition containing the blob:-URL and then issue a download. Since blob:-URLs contain GUIDs, the odds of a conflicting blob:-URL should be negligible. If this is feasibly implementable, then I'd favor such an approach instead of waiting for additions to extension APIs.
Comment 12•6 months ago
|
||
Set release status flags based on info from the regressing bug 1843155
Updated•6 months ago
|
Comment 13•6 months ago
|
||
Hi Tim, thought I was would forward this to you. If there is something that I need to contribute for this, I can do that too
Comment 14•6 months ago
|
||
Thanks. Let's keep an eye on the TPAC discussion to decide how we proceed.
Comment 15•6 months ago
|
||
(needinfo'ing myself to update this bug when there is a reply)
Tim - is it feasible to look up from any partition as I described in comment 11?
Comment 16•6 months ago
|
||
Set release status flags based on info from the regressing bug 1843155
Comment 17•6 months ago
|
||
We didn't get to discussing this topic at TPAC.
Tim: question, how feasible is the fix I sketched in comment 11?
(In reply to Rob Wu [:robwu] from comment #11)
An alternative solution would be for the extension implementation to query for the partition containing the blob:-URL and then issue a download. Since blob:-URLs contain GUIDs, the odds of a conflicting blob:-URL should be negligible. If this is feasibly implementable, then I'd favor such an approach instead of waiting for additions to extension APIs.
Comment 18•6 months ago
|
||
Sorry for the late response.
I think this is a feasible implementation. The document's partitionKey can be queried through the cookieJarSettings. And the cookieJarSettings is avaiable through the chrome-only interface in the document.webidl.
Updated•6 months ago
|
Updated•5 months ago
|
Description
•