Show compatibility error if an add-on uses nsIPermissionManager

VERIFIED FIXED

Status

VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: jorgev, Assigned: cgrebs)

Tracking

Details

(Whiteboard: [port-to-js-validator][fx42])

(Reporter)

Description

3 years ago
As explained in bug 1165263 (and dependencies), the Permission Manager now uses origins instead of hosts to store its permissions. This means some methods work differently, sometimes in subtle ways, so it's best to flag all instances of nsIPermissionManager and Services.perms

This is a compatibility error, so the add-on shouldn't be upgraded in this case. It should also appear as a warning in regular validations.

Message:

The Permission Manager now uses origins instead of hosts, meaning that http://mozilla.com and https://mozilla.com now have different permissions. Some methods in the component now take nsIURI instead of strings. See <LINK> for more information.

Link: https://bugzilla.mozilla.org/show_bug.cgi?id=1165263

Affected add-on:

https://addons.mozilla.org/addon/yahoo-mail-notifier/

Release timing:

Firefox 42 will be released on November 3rd.

Updated

3 years ago
Assignee: mstriemer → nobody

Updated

3 years ago
Iteration: --- → 44.3 - Nov 2
Whiteboard: [fx42] → [port-to-js-validator]

Updated

3 years ago
Assignee: nobody → cgrebs
We've tried this modified validator on the yahoo-mail-notifier add-on, and it doesn't flag it.

However, it did flag it if the nsIPermissionManager code is copied to other places in the add-on (eg. to the global context of the same file). The exact thing we did is take the code from chrome/ym_notifier/content/ym_notifier.js (line 2053 and below), and copied it at the beginning, and then at the end of the same file. In each case, it flagged the add-on correctly (as is the case in the unit tests where we use the same code).

So we have no clue why this is happening, could someone please give it a look? :andym would you know who we could ask for help?
Flags: needinfo?(amckay)

Comment 3

3 years ago
mstriemer on the case
Flags: needinfo?(amckay)
Issue was fixed by :mstriemer in ttps://github.com/mozilla/amo-validator/pull/335!

Comment 5

3 years ago
Commit pushed to master at https://github.com/mozilla/amo-validator

https://github.com/mozilla/amo-validator/commit/c39bc4721e9c3d7a7baa0a3f16e688a840abbef7
Show compatibility error if an add-on uses nsIPermissionManager (pair with cgrebs) (bug 1214912)
(Assignee)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Comment 6

3 years ago
verified fixed at https://addons.allizom.org/en-US/developers/upload/903b72f48c35413a9731d7a60ad649b9
Status: RESOLVED → VERIFIED
(Reporter)

Updated

3 years ago
Whiteboard: [port-to-js-validator] → [port-to-js-validator][fx42]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.