xdg-desktop-portal icon indicating copy to clipboard operation
xdg-desktop-portal copied to clipboard

Unauthorized mkdir breaks Firefox Snap "Save Page As ..." feature

Open lissyx opened this issue 3 years ago • 2 comments

When using Firefox under a Snap, the "Save Page As ..." feature when selecting "Complete page" is broken. More context in https://bugzilla.mozilla.org/show_bug.cgi?id=1774556

From what I could diagnose:

  • Our "Save Page As ..." code will use GTK for selecting the target file
  • Then it performs download using nsITransfer
  • Next to the selected target file, a folder will be created to save the assets linked to the page

That last step fails on mkdir because the portal seems to deny it. Is this an actual sandbox limitation or a bug in the portal ?

If it is a limitation, are there alternatives or could we fix the sandbox to allow mkdir in that case ?

Attached is a small snap package reproducing the issue, via Python/DBus calls

snap.zip

lissyx avatar Jul 06 '22 14:07 lissyx

Related: #463

rusty-snake avatar Jul 06 '22 15:07 rusty-snake

Related: #463

Looks like this exact usecase was already mentionned in https://github.com/flatpak/xdg-desktop-portal/issues/463#issuecomment-987288031.

lissyx avatar Jul 06 '22 16:07 lissyx

Yes. Let's keep track of this request there, and consider this a spiritual duplicate of #463.

GeorgesStavracas avatar Dec 12 '22 19:12 GeorgesStavracas