←back to thread

1318 points xvector | 5 comments | | HN request time: 0.847s | source
Show context
gpm ◴[] No.19824410[source]
To re-enable all disabled non-system addons you can do the following. I am not responsible if this fucks up your install:

Open the browser console by hitting ctrl-shift-j

Copy and paste the following code, hit enter. Until mozilla fixes the problem you will need to redo this once every 24 hours:

    // Re-enable *all* extensions

    async function set_addons_as_signed() {
        Components.utils.import("resource://gre/modules/addons/XPIDatabase.jsm");
        Components.utils.import("resource://gre/modules/AddonManager.jsm");
        let addons = await XPIDatabase.getAddonList(a => true);

        for (let addon of addons) {
            // The add-on might have vanished, we'll catch that on the next startup
            if (!addon._sourceBundle.exists())
                continue;

            if( addon.signedState != AddonManager.SIGNEDSTATE_UNKNOWN )
                continue;

            addon.signedState = AddonManager.SIGNEDSTATE_NOT_REQUIRED;
            AddonManagerPrivate.callAddonListeners("onPropertyChanged",
                                                    addon.wrapper,
                                                    ["signedState"]);

            await XPIDatabase.updateAddonDisabledState(addon);

        }
        XPIDatabase.saveChanges();
    }

    set_addons_as_signed();
Edit: Cleanup up code slightly...
replies(13): >>19824419 #>>19824512 #>>19824757 #>>19824939 #>>19825095 #>>19825736 #>>19826031 #>>19826062 #>>19826188 #>>19826298 #>>19826513 #>>19827530 #>>19829476 #
leon22 ◴[] No.19826062[source]
// Re-enable all extensions

    async function set_addons_as_signed() {
        Components.utils.import("resource://gre/modules/addons/XPIDatabase.jsm");
        Components.utils.import("resource://gre/modules/AddonManager.jsm");
        let addons = await XPIDatabase.getAddonList(a => true);

        for (let addon of addons) {
            // The add-on might have vanished, we'll catch that on the next startup
            if (!addon._sourceBundle.exists())
                continue;

            if( addon.signedState != AddonManager.SIGNEDSTATE_UNKNOWN )
                continue;

            addon.signedState = AddonManager.SIGNEDSTATE_NOT_REQUIRED;
            AddonManagerPrivate.callAddonListeners("onPropertyChanged",
                                                    addon.wrapper,
                                                    ["signedState"]);

            await XPIDatabase.updateAddonDisabledState(addon);

        }
        XPIDatabase.saveChanges();
    }

    set_addons_as_signed();
replies(1): >>19826874 #
igivanov ◴[] No.19826874[source]
TypeError: Components.utils is undefined[Learn More]

what did I do wrong? (It's all Greek to me)

replies(1): >>19826903 #
gpm ◴[] No.19826903[source]
What version of firefox are you running?

Apparently beta and nightly need to change `Components.utils.import` to `ChromeUtils.import`.

But anyways, don't use this now, use the semi-official fix of clicking on this link and letting it install: https://storage.googleapis.com/moz-fx-normandy-prod-addons/e...

This is the fix Mozilla has published to be installed via shield studies, but skipping the shield studies part. You can be sure it's not malicious because it is signed by Mozilla... and if your browser installed unsigned extensions you wouldn't be looking for this solution in the first place.

replies(43): >>19826914 #>>19827772 #>>19827810 #>>19827818 #>>19827857 #>>19827897 #>>19827921 #>>19827958 #>>19828018 #>>19828116 #>>19828298 #>>19828425 #>>19828451 #>>19828536 #>>19828601 #>>19828705 #>>19828732 #>>19828877 #>>19829123 #>>19829240 #>>19829533 #>>19829848 #>>19831009 #>>19831187 #>>19831360 #>>19831455 #>>19831797 #>>19832581 #>>19832743 #>>19833096 #>>19833522 #>>19833610 #>>19833774 #>>19836075 #>>19837384 #>>19838847 #>>19839425 #>>19840363 #>>19844475 #>>19847894 #>>19857538 #>>19861568 #>>19873631 #
1. Alphos2000 ◴[] No.19828116[source]
Nothing happens for me once installed in firefox 55.0.3 32bits. Can't activate my addons.
replies(1): >>19828171 #
2. gpm ◴[] No.19828171[source]
That's a really old version of firefox, probably an API has changed with my workaround.

I know of an API change that means the official hotfix won't work (whether you install it my bootleg way or the official studies way).

My recommendation is to upgrade your firefox version.

replies(1): >>19828303 #
3. Alphos2000 ◴[] No.19828303[source]
The reason I don't want to upgrade is because I don't want to lose all my legacy addons, a lot of them dissapeared and there are no alternatives. I can't understand how Mozilla can break my browser remotely and force me tu upgrade to a more restricted browser...
replies(2): >>19828379 #>>19855434 #
4. gpm ◴[] No.19828379{3}[source]
Mozilla didn't really "break your browser remotely", it's more like there was a time bomb included that just went off.

If you try hard enough you can probably fix your browser, unpack the .xpi (it's just a zip), look at the source in experiments/skeleton, and try to figure out how to run something similar in the browser console.

But I really can't recommend doing this, I appreciate it's painful, but what you're running right now is massively insecure, there are published exploits. You're just asking for viruses by interacting with the internet using something that old.

5. NopesNopesNopes ◴[] No.19855434{3}[source]
Install WaterFox, same old FF56 but the legacy addons are still working.