Closed Bug 676815 Opened 15 years ago Closed 15 years ago

Flag preferences outside of the "extensions." branch

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Q3 2011

People

(Reporter: kmag, Assigned: basta)

References

Details

(Whiteboard: [ReviewTeam])

Many new add-on submissions inadvertently create their preference branches at the root, which we don't allow. Additionally, we rarely allow extensions to change preferences not specific to their extensions. It would be a good idea to flag any calls to pref() or user_pref() in defaults/preferences/*.js that don't start with "extensions." with a message something like: "Add-ons are not allowed to create preferences outside of the 'extensions.' preference branch or modify preferences which are not specific to their add-ons. Please be sure to prefix all of your preference names with 'extensions.'"
Whiteboard: [required amo-editors]
OS: Linux → All
Hardware: x86_64 → All
Assignee: nobody → mbasta
Priority: -- → P3
Target Milestone: --- → Q3 2011
You may also wish to whitelist "services.sync.prefs.sync.extensions.*" for those who are adding their own extension prefs to the Sync list. (yes, the Sync prefs are hideous) Having a policy of no new addons without the "extension." prefix is fair enough, but are you going to start requiring addons a few years or more old to migrate all their prefs? It could be a bit of a pain unless you happen to be completely changing how your addon saves things, though when this does happen migrating would probably be a good idea. More than a few of us have had just our extension name as the root of our prefs for many years. If the name is generic enough a collision is theoretically possible, so recommending a migration to use the "extensions." prefix makes sense, but if the name is unique enough then an "if it ain't broke don't fix it" approach might be good.
The policy is not new. Old extensions have always been grandfathered in, though I'd personally prefer that they migrate their old preferences. I agree that "services.sync.prefs.sync.extensions." should also be ignored. The following should still be flagged: extensions.alwaysUnpack extensions.blocklist. extensions.bootstrappedAddons extensions.checkCompatibility extensions.dss. extensions.getAddons. extensions.getMoreThemesURL extensions.installCache extensions.lastAppVersion extensions.pendingOperations extensions.update. and likewise in the sync branch.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 694634
Reclassifying editor bugs and changing to a new whiteboard flag. Spam, spam, spam, spam...
Whiteboard: [required amo-editors] → [ReviewTeam]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.