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 Desktop
Packages, which is subscribed to xdg-desktop-portal in Ubuntu.
https://bugs.launchpad.net/bugs/1973596

Title:
  SRU 1.14.3-0ubuntu3 to jammy

Status in xdg-desktop-portal package in Ubuntu:
  Fix Released
Status in xdg-desktop-portal source package in Jammy:
  In Progress

Bug description:
  [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.

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


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to