Drag- and dropping files in GitHub issues does not work in flatpak
Categories
(Firefox Build System :: Third Party Packaging, defect, P5)
Tracking
(Not tracked)
People
(Reporter: 5i13ghzt462u, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0
Steps to reproduce:
- In any GitHub issue. write a reply.
- Drag and drop an image file.
Actual results:
First,I got some Chinese characters.
Now, reytring it, it takes multiple seconds, and then I get the file path as file:// protocol as text!
Expected results:
Drag- and drop upload.
This is specific to flathub's org.mozilla.firefox flatpak.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Because this bug's Severity is normal
and has not been changed, and this bug's priority is --
(none,) indicating it has has not been previously triaged, the bug's Severity is being updated to --
(default, untriaged.)
Comment 3•5 years ago
|
||
The severity field is not set for this bug.
:enndeakin, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Updated•3 years ago
|
The solution I found is to launch this command in the terminal:
WARNING: IT WILL RESET ALL YOUR SETTINGS AND WILL LOG OUT FROM ALL SITES. IT WILL BE RESETTED LIKE AFTER THE INSTALLATION
flatpak override --user --filesystem=home org.mozilla.firefox
(In reply to lukigno95 from comment #5)
The solution I found is to launch this command in the terminal:
WARNING: IT WILL RESET ALL YOUR SETTINGS AND WILL LOG OUT FROM ALL SITES. IT WILL BE RESETTED LIKE AFTER THE INSTALLATION
flatpak override --user --filesystem=home org.mozilla.firefox
Would be possible to add this feature at build time? I mean for the common user it's just impossible to think that can find this solution and run it in the terminal
Comment 7•3 years ago
|
||
When a file is drag-and-dropped, the compositor will send an event with a path to the file in the host.
Sandboxed applications can't read this path, since they don't have filesystem access on the host, so the reading the dropped file fails.
This requires compositors to integrate with the xdg-document-portal. There's an issue for this for sway: https://github.com/swaywm/sway/issues/6460
In the meantime, I don't think there's anything Firefox can do to support this.
flatpak override --user --filesystem=home org.mozilla.firefox
Note that this pretty much negates the usefulness of the sandbox; Firefox can read and write any file in your home (including ssh keys, etc), and alter .bashrc and friends to hijack sessions entirely.
In Firefox Drag & Drop works from files within the Download directory.
I don't think there's anything Firefox can do to support this.
Something regarding this was merged into xdg-desktop-portal in 2019:
https://github.com/flatpak/xdg-desktop-portal/issues/99#issuecomment-565043646
And it was said that Gtk4 apps should have support for this out of the box support according this comment: https://github.com/flatpak/xdg-desktop-portal/issues/99#issuecomment-565264246
So maybe it needs the same or similar logic in FF?
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Re-triaging because this is most likely due to Flatpak's sandboxing not punching a hole for the file rather than anything DOM related.
Updated•2 years ago
|
Description
•