addons-linter icon indicating copy to clipboard operation
addons-linter copied to clipboard

Warn about optional_permissions without optional_host_permissions / host_permissions

Open Rob--W opened this issue 1 year ago • 0 comments

Firefox 128 introduced support for optional_host_permissions (https://bugzilla.mozilla.org/show_bug.cgi?id=1766026), which removes the need for optional_permissions. Chrome does not support origins in optional_permissions. There may still be some value in the use of optional_permissions for backwards-compatibility with Firefox < 127 (such as Firefox ESR 115, which continues to be supported until October 1st, 2024).

We should check for the existence of origins in optional_permissions, and then verify whether it is present in optional_host_permissions (or host_permissions). If it is missing, it means that the permission won't be available in Chrome, or potentially in future versions of Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1897580). We should warn about that in this case, and recommend that the dev adds the origin to optional_host_permissions.

FYI: here is an analysis of public extensions that use origins in optional_permissions: https://bugzilla.mozilla.org/show_bug.cgi?id=1897580#c1

Rob--W avatar Jun 06 '24 12:06 Rob--W