Repository navigation
Conversation
Debian's Firefox is Firefox ESR, installed as firefox-esr.desktop. The web extension's helper registers with the portal under the name of the desktop file the browser was launched from, so requests from it arrive with the app ID firefox-esr. That isn't in the list of privileged clients, so its requests were handled as unprivileged and couldn't carry a top origin for cross-origin iframes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Debian ships Firefox as Firefox ESR, with the desktop file
firefox-esr.desktop. The web extension's helper registers with the portal under the stem ofGIO_LAUNCHED_DESKTOP_FILE, so on Debian requests arrive with the app IDfirefox-esr. That isn't in the daemon's list of privileged clients. So Firefox ESR requests are handled as unprivileged and can't pass a top origin for cross-origin iframes. And once the per-app origin check for unprivileged clients is implemented, they would be refused.This adds
firefox-esrto the list, with tests for it and for an unknown app ID.Testing
On a Debian sid VM with GNOME 51, Firefox ESR 153 started from the app grid, the patched xdg-desktop-portal (1.22.1 + Credential commits), the credentialsd packages from #268, and a virtual FIDO2 key over USB/IP. I registered on webauthn.io with the extension:
mainapp_id: AppId("firefox-esr"),request_kind: Unprivileged(Https { host: "webauthn.io", .. })app_id: AppId("firefox-esr"),request_kind: Privileged { origin: Https { host: "webauthn.io", .. }, .. }The portal log showed
Adding registered host app 'firefox-esr', and the helper log showedRegistering with the portal as firefox-esr.Firefox snap (Ubuntu): not changed here
I also looked at the Firefox snap on Ubuntu 26.04, since the goal is Ubuntu 27.04. I didn't add anything for it, because I couldn't test it end to end:
snap.firefox(fromsnap routine portal-info). But the helper registers the stem ofGIO_LAUNCHED_DESKTOP_FILE, and the snap's desktop file isfirefox_firefox.desktop. So the app ID that reaches the daemon is probablyfirefox_firefox.<app id>.desktopfor the requesting app's name, and cancels the request when it isn't found. That's fine forfirefox_firefox, but not forsnap.firefox.How would you like snap Firefox handled? I can test it once there's a portal build for Ubuntu that has both patches.