Closed Bug 1180708 Opened 10 years ago Closed 10 years ago

Validator flagging setting of extension preferences

Categories

(addons.mozilla.org Graveyard :: Add-on Validation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mkaply, Unassigned)

Details

The validator is flagging places where I'm setting prefs on the extension branch: Attempt to set a dangerous preference Warning: Extensions should not alter preferences outside of the 'extensions.' preference branch. Please make sure that all of your extension's preferences are prefixed with 'extensions.add-on-name.', where 'add-on-name' is a distinct string unique to and indicative of your add-on. modules/BTPIFF4.jsm 159 160 161 if (aData) { Services.prefs.setCharPref("extensions.brandthunder.btpersonas.currentPersona", aData.id) } else { Attempt to set a dangerous preference Warning: Extensions should not alter preferences outside of the 'extensions.' preference branch. Please make sure that all of your extension's preferences are prefixed with 'extensions.add-on-name.', where 'add-on-name' is a distinct string unique to and indicative of your add-on. modules/BTPICanvas.jsm 35 36 37 if (row["id"] == currentPhoto) { Services.prefs.setIntPref("extensions.brandthunder.canvas.id", canvasDB.length-1); } Attempt to set a dangerous preference Warning: Extensions should not alter preferences outside of the 'extensions.' preference branch. Please make sure that all of your extension's preferences are prefixed with 'extensions.add-on-name.', where 'add-on-name' is a distinct string unique to and indicative of your add-on. modules/BTPICanvas.jsm 40 41 42 str.data = JSON.stringify(canvasDB); Services.prefs.setComplexValue("extensions.brandthunder.btpersonas.canvas", Ci.nsISupportsString, str); dbConnection.asyncClose(function() { Attempt to set a dangerous preference Warning: Extensions should not alter preferences outside of the 'extensions.' preference branch. Please make sure that all of your extension's preferences are prefixed with 'extensions.add-on-name.', where 'add-on-name' is a distinct string unique to and indicative of your add-on. modules/BTPICanvas.jsm 48 49 50 BTPICanvas.dbMigrated = true; Services.prefs.setBoolPref("extensions.brandthunder.btpersonas.canvas.dbMigrated", true); }, Attempt to set a dangerous preference Warning: Extensions should not alter preferences outside of the 'extensions.' preference branch. Please make sure that all of your extension's preferences are prefixed with 'extensions.add-on-name.', where 'add-on-name' is a distinct string unique to and indicative of your add-on. modules/BTPICanvas.jsm 58 59 60 str.data = JSON.stringify(canvasDB); Services.prefs.setComplexValue("extensions.brandthunder.btpersonas.canvas", Ci.nsISupportsString, str); },
Where are you seeing this? I can't reproduce.
I'm not seeing it anymore. Must have been a temporary problem. I saw it on the validator page with an unlisted add-on.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.