Skip to content

Add cookies permissions missed in #8740 - #8786

Closed
prplecake wants to merge 1 commit into
refined-github:mainfrom
prplecake:add-cookies-permissions
Closed

prplecake wants to merge 1 commit into
refined-github:mainfrom
prplecake:add-cookies-permissions

Conversation

@prplecake

@prplecake prplecake commented Nov 20, 2025 •

Copy link
Copy Markdown

Really fixes #8657 this time. #8740 missed adding the required "cookies" permissions.

From https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities#permissions:

If an API enables cookies to be modified, you need the "cookies" permission. For example, using cookieStoreId in tabs.query does not require the "cookies" API, as reading the property doesn't affect the cookies in the containers. However, using tabs.create requires the permission because the opened tab can read and modify cookies in a container.

Fixes #8785

Test URLs

Screenshot

@fregante

Copy link
Copy Markdown
Member

Refer to #8782 (comment)

Does this introduce new text in the permission dialog? If so, this change would make Firefox disable Refined GitHub updates everywhere.

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell it doesn't trigger a new permission dialog in neither Chrome nor Firefox, however:

  • the permission requires an explanation in the web store, and it's not needed in Chrome, so it would be hard to justify
  • we currently don't have any way to customize builds by browser, which impacts DX for local extension development

In the past we customized the build just before deployment, but it has drawbacks.

  • if we leave cookies in the manifest.json and remove it in the chrome deployment: if this fails silently, a bad manifest will be published to the store
  • if we add cookies to the manifest.json in the Firefox deployment: developers won't be able to use openTabs locally

Perhaps:

  1. add cookies to the manifest.json in the Firefox deployment
  2. also check if the cookies permission exists before adding cookieStoreId in openTabs

For the time being I'll soft-revert the previous PR and release a new Refined GitHub version.

@fregante

Copy link
Copy Markdown
Member

Continues in #8657

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

open-all-notifications broke unread-anywhere should inherit the container in Firefox

2 participants