Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camera: fix permission check in OpenPipeWireRemote #1576

Conversation

mcatanzaro
Copy link
Contributor

Backport of #1572 for xdp-1.18

6cd99b0 changed the logic that the
camera portal uses to look up permissions for the AccessCamera method.
Applications first call AccessCamera to ensure they have camera
permission and to prompt the user if permission is missing, then they
call OpenPipeWireRemote, which fails if permission is missing. The
permission lookup logic needs to be the same in both places. Currently
when running Snapshot launched by GNOME Shell (rather than launched in a
terminal), Snapshot passes AccessCamera's permission check, then fails
OpenPipeWireRemote's permission check, causing camera access to be
denied without allowing the user to grant permission.

Also, since the same commit the code uses the XdpAppInfo on a secondary
thread. I suspect this is unsafe, and the original code avoided doing
so; therefore, let's be careful and move this logic to the main thread
so that the secondary thread only receives a copy of the app ID, as
before.

https://gitlab.gnome.org/GNOME/snapshot/-/issues/267
@GeorgesStavracas GeorgesStavracas merged commit a6df1d0 into flatpak:xdg-desktop-portal-1.18 Jan 17, 2025
4 checks passed
@GeorgesStavracas GeorgesStavracas added this to the 1.18 milestone Jan 20, 2025
@GeorgesStavracas GeorgesStavracas added the portal: camera Camera portal label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
portal: camera Camera portal
Projects
No open projects
Status: Triaged
Development

Successfully merging this pull request may close these issues.

2 participants