user.js icon indicating copy to clipboard operation
user.js copied to clipboard

discussion: create System Addon section

Open Thorin-II opened this issue 9 years ago • 19 comments

snip

Thorin-II avatar Jul 15 '17 17:07 Thorin-II

where to put SYSTEM ADDONS : IMHO, before or after "PLUGINS", as they both extend the functions of the browser (even if plugins are dying)

2glops avatar Jul 15 '17 18:07 2glops

Thanks for the links, nice find! These 2 definitely need to go in the user.js. From your first link this part is especially interesting... we can set extensions.systemAddon.update.url to a value to "remove all system add-on updates". "updates" only though, not the pre-installed versions. But still, we should include that pref in the new section, somewhere at the top. We can set it to empty string (boring ;) or make it pretend there are no updates, or to "remove all system add-on updates". I mean you have to give these guys credit, they really document their stuff very well and in great detail. Thx for that @mozillaGuys xD

it needs a round hundred, so it has room to grow over time - so 500, 600, 700 etc are all options.

600 is taken but I agree 500 or 700 are also good candidates.

current sections

we should add that list to the Readme IMO.

mortar and pdfjs are the other two not mentioned in earthlng's list

mortar doesn't seem to be a system addon. No idea what that is. pdfjs is likely just hosted there with the rest of them but will unfortunately probably not be made into a system-addon.

earthlng avatar Jul 15 '17 20:07 earthlng

I'll address a couple things but then I really think we should take this step by step. Finish something then move on to the next and cleanup the comments first. Otherwise we end up with walls of text that are all over the place.

Flyweb - I think was introduced in FF50

according to my diffs dom.flyweb.enabled was new in FF49, if that's what we are going by. I have diffs for as far back as FF38vs39 - I should probably upload them to my repo so you or anyone else can use them as well for things like this.

/* 0517: disable Screenshots (FF55+)

Screenshots definitely exists already in FF54. ie it's shipped with the setup for everyone. pref("extensions.screenshots.system-disabled", true); was new in FF54. pref("extensions.screenshots.disabled", false); is new in FF55b1


I don't think we necessarily need DESCRIPTION & SCARYSTUFF. A couple of links are good enough IMO.

/* 0503: extensions.systemAddon.update.url ? ***/ // EARTHLNG: what does this achieve exactly - it could block updates to pdfjs

It could, idk. If we don't "disable" this url then it could install updated versions of addons that someone completely removed from the /browser/features/ folder. Just saying. If we don't care about that, fine.


Are we sure the two experiment prefs belong here. ...

We can name the section "Mozilla System-Addons / Experiments"

Isn't Test Pilot how they now experiment?

Test Pilot, afaik, is something that a user has to install. The other stuff (experiments, shield-shit, etc) is all done without user consent.

earthlng avatar Jul 16 '17 16:07 earthlng

If you can correct me, awesome. Maybe go find a bugzilla source. Otherwise I'm going with FF39+

Yes, according to my diffs the old, original browser.pocket.* prefs were new in FF39. In FF46 they added pref("extensions.pocket.enabled", true); and removed all the browser.pocket.* prefs. All the other replacement prefs (extensions.pocket.*) apart from extensions.pocket.enabled are now set by the addon itself. (.oAuthConsumerKey, .api, etc) IMO we can remove the following prefs because .enabled is the master switch:

user_pref("extensions.pocket.api", "");
user_pref("extensions.pocket.site", "");
user_pref("extensions.pocket.oAuthConsumerKey", "");

Proof: here you can see that in the addon's startup() function it sets the default prefs (but doesn't overwrite them if already set), then migrates the old master pref, adds an observer (so that toggling the pref in about:config actually does something) and then returns if the master switch is set to false ie it never runs PocketOverlay.startup() oAuthConsumerKey also seems to be the same for everyone anyway.

earthlng avatar Jul 16 '17 18:07 earthlng

extensions.systemAddon.update.url

I do not think we should list this or meddle with this.

I disagree. We should at least list it as inactive.

You either physically remove an item/xpi or use the built in switches.

But that's the thing - even if you remove an xpi completely they can still install you a new version

There's not much that can't be disabled by the looks of it (despite the statement in link [1] that "[they] cannot be user disabled")

Unless you remove them from your install-dir they are "technically" impossible to disable ie they show up in about:support as "enabled". Yes you can "stop" most of them from doing anything but that's not what [they] are talking about.

Besides, these could contain fixes for security or privacy. The whole point was the quick updating, restartlessness. Seems Monty Pythonesque to turn that off (might as well buy a dead parrot to begin with).

AFAIK if that's a concern we need to enable auto-install "app-updates" according to this comment. IDK if that's still the case though but I've certainly never received any system-addon updates or fresh installs (fe the HSTS one they mention in that comment)

earthlng avatar Jul 16 '17 18:07 earthlng

What I'm concerned about now is that with our default settings - i.e check but allow me to choose when to update the application - that as per that ticket, system addons will not update

that's what I meant

earthlng avatar Jul 16 '17 19:07 earthlng

  • Shield - this is a bitch!

from https://wiki.mozilla.org/Firefox/Shield:

December 2016 - SHIELD System Add-on lands in mozilla-central

according to the changeset for that bugzilla, shield was first deployed in FF53

The only good thing about Shield is that it lead to the removal of SelfSupport from FF's core: https://hg.mozilla.org/mozilla-central/rev/5a8f2dcbeac0 It still looks at browser.selfsupport.enabled but it needs that pref to be false for Shield to do something. The problem with this addon is that it auto-uninstalls when it's done and I'm not sure we should try to stop it from gathering telemetry ie hit the return here. Instead, in addition to setting extensions.shield-recipe-client.enabled, we should just neutralize the .api_url by setting it to empty string.

.api_url = https://normandy.cdn.mozilla.net/api/v1 - this is where it gets everything from, f.e the current "recipes" https://normandy.cdn.mozilla.net/api/v1/recipe/

extensions.shield-recipe-client.enabled is checked a bit later on and only after toolkit.telemetry.unified is checked first. see lines 44, 63 + 68 here I think we should still set .api_url to empty string, just in case.

earthlng avatar Jul 16 '17 19:07 earthlng

I do not understand this .api_url

It all starts here in bootstrap.js function startup(). That's the entry point for all bootstrapped addons. There it calls ShieldRecipeClient.startup() which is here. On the first line it sets the default values which you can see on line 34. The api_url is then later, maybe among other places, checked here to make sure it's a valid url. Granted at that point we would have already returned if either toolkit.telemetry.unified or extensions.shield-recipe-client.enabled are false, and we probably don't need to include api_url in the user.js

stopping shield:

  • bootstrap.js startup() calls ... // if you somehow get that addon, this is where it starts
    • ShieldRecipeClient.startup(), which calls ... // no way to stop hitting this
      • ShieldRecipeClient.setDefaultPrefs(); // this is fine
      • does // Setup logging and listen for changes to logging prefs
      • it returns here if browser.selfsupport.enabled=true && extensions.shield-recipe-client.dev_mode=false // we could make it stop right here! is it a good idea though? idk! otherwise it continues by calling ...
      • PreferenceExperiments.init(); // can this be stopped? idk yet, need to look at the code
      • RecipeRunner.init(); // this returns without doing anything if either toolkit.telemetry.unified or extensions.shield-recipe-client.enabled are set to false

earthlng avatar Jul 16 '17 20:07 earthlng

  • aushelper - this is fine. It changes the app update url if someone has Websense installed because that apparently causes problems with certain FF versions. And also something to do with CPUs, idk exactly. "aus" probably stands for application update service or something like that.

I looked at some of the addons on DXR (nightly) to see what they do and if there are any other prefs for them...

  • webcompat - the current version has 1 pref extensions.webcompat.perform_ua_overrides but it gets reset if it's user-set, right at the beginning in the startup function:
 // Intentionally reset the preference on every browser restart to avoid site
 // breakage by accidentally toggled preferences or by leaving it off after
 // debugging a site.
 Services.prefs.clearUserPref(UA_ENABLE_PREF_NAME);

Atm (in nightly!) that's all it does: user-agent overrides. But so far there's only one override set up, for an example site to test if the addon works:

  /*
   * This is a dummy override that applies a Chrome UA to a dummy site that
   * blocks all browsers but Chrome.
   *
   * This was only put in place to allow QA to test this system addon on an
   * actual site, since we were not able to find a proper override in time.
   */

It does register an observer for that pref so you can toggle it off if the override causes problems, but the only way to completely stop this addon from the user.js is to use "pref()" instead of "user_pref" (or lock the pref). But I don't think we should do that. We can add the pref commented out IMO.

earthlng avatar Jul 18 '17 15:07 earthlng

~~Anyone wanna build a draft, man~~ :snowman: I guess not! Might as well do it myself then sigh

yeah sorry mate, was kinda busy with the canvas blocker testing stuff 🤦‍♂️ offtopic but how the fuck is :man_facepalming: = a woman facepalming ??? gender madness on github now too?! or is this coming from FF?? well that's just fucking great /rant

AutoFormFill

  • Data is stored in a JSON file (that's not very secure!)

They also want to add support for credit cards 🤦‍♂️ ez matching email addresses + cc numbers - nice. https://blog.nightly.mozilla.org/2017/05/23/preview-form-autofill-in-firefox-nightly/

Web Compatibility Reporter ... basically enables a Report Site Issue button which sends a screenshot to Mozilla (and maybe you can enter some text who knows).

That's in a test file and I didn't look at those. But you're right there's something in it that does that (I looked at the code that came bundled with FF56 nightly). There's another pref that holds the URL for the endpoint: https://dxr.mozilla.org/mozilla-central/source/modules/libpref/init/all.js#4939 You can look at the site - it's already up and has a nice little window where the screenshot would go.

earthlng avatar Jul 19 '17 08:07 earthlng

We can remove extensions.screenshots.system-disabled IMO Y/N?

yes

extensions.formautofill.loglevel - IMO we can drop this pref, since if the addon is disabled, it wont log anything

definitely. Even if it did log something, these .loglevel prefs usually only control the verbosity of console output

AutoFormFill - There is a UI pref - what is it (if you have 55+ let me know if it has changed)

the addon itself adds that option to the UI. In my FF56 nightly with all the system-addons removed, that option doesn't exist in the UI

Onboarding is an install/new profile experience/user-tour.

that's some weird word separation. "Onboarding is an install profile experience" - would that be one part of it or what? what does that mean? this needs some re-wording IMO

earthlng avatar Jul 19 '17 08:07 earthlng

Yeah we can always change it later. Someone cough needs to take one for the team and test this shit I guess. cough yes-i-will-do-it-i-am-selfless cough

earthlng avatar Jul 19 '17 11:07 earthlng

follow-on-search https://blog.nightly.mozilla.org/2017/07/19/these-weeks-in-firefox-issue-20/

The Follow On Search Count addon was shipped to 54 population.

There's currently no pref to stop this addon (except setting distribution.id to a non-empty string). Atm it only collects telemetry and that's stopped by disabling telemetry. There is however a logging pref extensions.followonsearch.logging that you can set to true to get console output about what it would send as telemetry. IMO we should include that pref (inactive) so we don't forget that this thing exists, and then check back from time to time to see if it "evolved" and if by then there are prefs to disable it completely.

edit: https://bugzilla.mozilla.org/show_bug.cgi?id=1372307#c0

This bug is to ship to 54 the same system addon for follow on counts that was shipped to 53.

= changed it to FF53+ in the draft below

earthlng avatar Jul 20 '17 14:07 earthlng

https://blog.mozilla.org/data/2017/06/05/measuring-search-in-firefox/

I can't stand this fucking marketing talk/spin. I'm pretty sure they will eventually intercept the follow-on-search requests and add their utm tracking parameters.

This data will allow us to greatly improve the Firefox search experience while still respecting user privacy.

"greatly" huh? bullshit! They hadn't even started collecting anything at that point, how could they already know the outcome?! and not just "improve" either but "greatly improve". BS!

"Search is blah blah how Mozilla makes much of its revenue." = this is the only time where they come right out and say what all of this is really about.

Firefox telemetry already includes a count of the searches users perform in all Firefox search bars. Firefox does not yet count follow-on searches.

= we already make money from searches users perform and we want money for follow-on searches as well.

When you search with one of the search engines that we include in Firefox, we will increment a counter for each follow-on search.

= they can only make money from SEs included in Firefox, basically admitting that it's not really about improving " Firefox search experience for our users", because they can also get telemetry for user-added search engines. Why are they not interested in those?

We seek these new measurements to gain missing insight into a crucial browser interaction.

= "gain" is an interesting choice of words. It hints at what they really had in mind while writing this. There are a few more of those: "our limited resources", "continue to sustain"

read the blog post again and tell me I'm wrong.

earthlng avatar Jul 21 '17 15:07 earthlng

extensions.systemAddon.update.url was added in FF44

Again, I ask, in any of the code (for these system addons) is there a lookup to respect a user's opt-out of telemetry

The shield client for example looks at the telemetry pref before initiating the recipe manager. But unless an addon uses google analytics, telemetry always uses the built-in telemetry framework. If that's disabled, afaik it doesn't matter whether there are telemetry gathering calls made in the addon.

earthlng avatar Jul 22 '17 20:07 earthlng

If you delete a system addon, will the update check restore it - or will it only update those that are present

It asks for updates based on your FF version. f.e lets say screenshots_v1.0 comes bundled with FF54: if you remove the addon it will probably not get "restored" as long as there's no new version. It will probably re-install (into your profile folder!) a new version (v1.1) regardless whether you removed v1.0 or not, because otherwise they could never deploy completely new addons

earthlng avatar Jul 22 '17 21:07 earthlng

Shield Recipe Client issues. It had an application on heroku, on hold before next iteration.

FF Pioneer... who the hell are the authors? The anonymous names have no homepage. I won't contribute while being deep probed. No, thanks.

Atavic avatar Jul 26 '17 18:07 Atavic

we missed extensions.webcompat.perform_ua_overrides

earthlng avatar Aug 12 '17 15:08 earthlng

And what? And what are those links supposed to tell me?

https://github.com/ghacksuserjs/ghacks-user.js/issues/171#issuecomment-316096653

we can ignore that pref IMO. I saw it in @Theemim's diff and thought we forgot to add it. nvm.

earthlng avatar Aug 17 '17 12:08 earthlng