xdg-desktop-portal
xdg-desktop-portal copied to clipboard
Once a file is opened with FileChooser, the permissions remain permanently in flatpak
Operating System
Arch Linux
XDG Desktop Portal version
1.18
XDG Desktop Portal version (Other)
1.18.2
Desktop Environment
GNOME
Desktop Environment (Other)
No response
Expected Behavior
The documents entries should be removed from flatpak permission-show ...
at some point, for example, on application restart, or (better) when the application is done working with the file.
Current Behavior
Once a file is opened with FileChooser in a flatpak application, that application gets permanent permissions to access that file. This poses a security risk (the application can access the file when the user doesn't expect it) and a privacy risk (it's possible to dump a full history of all opened file names, even when those files no longer exist; clearing this "history" isn't obvious).
Steps to Reproduce
- Using Telegram installed with Flatpak, send a file to someone.
- Observe the file added to
flatpak permission-show -v org.telegram.desktop
- The permission is never removed from that list anymore.
Anything else we should know?
I saw https://github.com/flatpak/xdg-desktop-portal/issues/689 and https://github.com/flatpak/flatpak/issues/4303, but those seem to refer to the FDs not being released, while I'm reporting flatpak permissions not being removed.