[snap] Opening a file with "Url Handler Script" does nothing
Categories
(Release Engineering Graveyard :: Release Automation: Snap, defect)
Tracking
(Not tracked)
People
(Reporter: olivier, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
33.92 KB,
image/png
|
Details |
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Snap's sandbox, not ours.
I assume the Snap environment has some way for an application to ask for a file to be opened in another app, but I don't know the details.
Reporter | ||
Comment 6•6 years ago
|
||
Yes, the blessed way for snaps to open a file is to call xdg-open, which is being proxied (after a few sanity checks) to outside the snap confinement.
As I understand it, firefox doesn't use xdg-open, instead it tries to query the system for applications that can handle a certain file type. This will fail in a strictly confined snap where this would be considered an information leak.
Comment 7•5 years ago
|
||
Firefox does use xdg-open if it's chosen as target application. The problem is that FF always save the file to /tmp or $TMPDIR before passing it over and /tmp in snap is being namespaced and inaccessible for anything outside snap sandbox. If the $TMPDIR would be set to some other path like $TMPDIR=$"SNAP_USER_DATA" in desktop-launcher the problem may be gone.
Comment 8•5 years ago
|
||
sorry, it should be "export TMPDIR=$"$SNAP_USER_DATA"
Reporter | ||
Comment 9•3 years ago
|
||
I tested this again on a variety of Ubuntu releases, and I'm not seeing this "Url Handler Script" option any longer, when opening files that are not handled by Firefox directly. Instead the default option in the dialog is "System Handler", and it does the right thing.
This bug can be closed.
Comment 10•3 years ago
|
||
Closing per comment 9.
Updated•7 months ago
|
Description
•