Public bug reported:

[Impact]

When testing native messaging support with the firefox snap (not yet
released, see https://github.com/flatpak/xdg-desktop-portal/pull/705),
gnome-shell won't prompt the user for permission to authorize a given
extension to access the portal, because the app id being passed to the
authorization request isn't what gnome-shell expects. This is
https://github.com/flatpak/xdg-desktop-portal/issues/769.

As a consequence, access is always denied, and native messaging just
doesn't work.

The patch that fixes this issue was discussed with the author of the
native messaging portal (James Henstridge) and approved by him, and is
now being cherry-picked here.


[Test Plan]

On jammy, fetch and install the latest test snap from 
https://launchpad.net/~osomon/+snap/firefox-native-messaging (manual 
installation requires the --dangerous flag).
Install the chrome-gnome-shell native connector (`sudo apt install 
chrome-gnome-shell`).
Open firefox and browse to 
https://addons.mozilla.org/firefox/addon/gnome-shell-integration/.
Click the "Add to Firefox" button on the page.
Accept the authorization request that appears as a popup to install the GNOME 
Shell integration extension.
Browse to https://extensions.gnome.org/local/.

You should be getting a GNOME Shell modal dialog that prompts you whether to 
allow Firefox to make use of the WebExtensions portal to launch the 
org.gnome.chrome_gnome_shell native connector.
Without this patch, GNOME Shell silently rejects the authorization request, and 
you won't see any prompt.

Note that if you've tested the functionality before installing the
patched version of xdg-desktop-portal, you'll need to delete the
database that stores the permissions on disk
(~/.local/share/flatpak/db/webextensions) and restart the portal.


[Where problems could occur]

This patch affects a portal that is not being used anywhere yet (the
implementation in the Firefox snap is work in progress and serves as a
proof of concept). So there is no risk of affecting existing
functionality or other portals.

At worst, the patch doesn't fix the issue it claims it resolves.

** Affects: xdg-desktop-portal (Ubuntu)
     Importance: Medium
     Assignee: Olivier Tilloy (osomon)
         Status: Fix Released

** Affects: xdg-desktop-portal (Ubuntu Jammy)
     Importance: Medium
     Assignee: Olivier Tilloy (osomon)
         Status: In Progress

** Changed in: xdg-desktop-portal (Ubuntu)
     Assignee: (unassigned) => Olivier Tilloy (osomon)

** Changed in: xdg-desktop-portal (Ubuntu)
   Importance: Undecided => Medium

** Changed in: xdg-desktop-portal (Ubuntu)
       Status: New => Fix Released

** Also affects: xdg-desktop-portal (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Changed in: xdg-desktop-portal (Ubuntu Jammy)
     Assignee: (unassigned) => Olivier Tilloy (osomon)

** Changed in: xdg-desktop-portal (Ubuntu Jammy)
   Importance: Undecided => Medium

** Changed in: xdg-desktop-portal (Ubuntu Jammy)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to xdg-desktop-portal in Ubuntu.
https://bugs.launchpad.net/bugs/1973596

Title:
  SRU 1.14.3-0ubuntu3 to jammy

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/1973596/+subscriptions


-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to