xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
1.06k stars 88 forks source link

Firefox release support removed suddenly? #324

Open mavink opened 3 weeks ago

mavink commented 3 weeks ago

Hey, why is the unsigned extension install feature suddenly removed? Is is something related to the onemen tabmixplus?

Adding back the following code to the config.js file enables all addons even in release.

    // signing bypass by Dumby from forum.mozilla-russia.org
  const g = Cu.getGlobalForObject(Cu);
  const sandbox = new Cu.Sandbox(g, { freshCompartment: true });
  Cc['@mozilla.org/jsdebugger;1'].createInstance(Ci.IJSDebugger).addClass(sandbox);
  const dbg = new sandbox.Debugger();
  dbg.addDebuggee(g);
  const gref = dbg.makeGlobalObjectReference(g);

  dbg.onEnterFrame = frame => {
    const { script } = frame;

    if (!script.url.startsWith('resource://gre/modules/AppConstants.'))
      return;

    dbg.onEnterFrame = undefined;

    if (script.isModule) { // ESM, Fx 108+
      const env = frame.environment;
      frame.onPop = () => env.setVariable('AppConstants', gref.makeDebuggeeValue(Object.freeze(
        Object.assign(new Object(), env.getVariable('AppConstants').unsafeDereference(), {
          'MOZ_REQUIRE_SIGNING': false
        })
      )));
    } else { // JSM
      const nsvo = frame.this.unsafeDereference();
      nsvo.Object = {
        freeze (ac) {
          ac.MOZ_REQUIRE_SIGNING = false;
          delete nsvo.Object;
          return Object.freeze(ac);
        }
      };
    }
  }

  ChromeUtils.import('resource://gre/modules/addons/XPIInstall.jsm');

  dbg.removeAllDebuggees();

Attaching the full file below. Now we can use both paxmod https://github.com/numirias/paxmod/issues/83 and tabmixplus at the same time

config.js.txt

117649 commented 3 weeks ago

You don't understand all of it.

Now Mozilla distributing add-ons that's un-ided. The id is giving later during\after sign check. Disable sign check these add-ons won't install.

So we don't disable sign check instead we add bypass condition.

mavink commented 3 weeks ago

It works. I'm running it in latest firefox release. image image

mavink commented 3 weeks ago

Which addon doesnt work after disabling sign check? I have installed after disabling sign check. addons install and work

david-UT99 commented 3 weeks ago

i can't get it to work anymore since like a month ago. :( ~ i got today's update. is there something else in about:config that needs to be changed ? (& which folder do i test your config, mavink? both?)

**EDIT! i did both and took out the .txt and i'm back in business! thanks, mavink.

117649 commented 3 weeks ago

Which addon doesnt work after disabling sign check? I have installed after disabling sign check. addons install and work

You're just lucky that those .xpi were not updated by mozilla. And we won't be bothered to test every .xpi on their site. We know there is and its enough.

mavink commented 2 weeks ago

Which addon doesnt work after disabling sign check? I have installed after disabling sign check. addons install and work

You're just lucky that those .xpi were not updated by mozilla. And we won't be bothered to test every .xpi on their site. We know there is and its enough.

I really can't understand what you are talking about. I just installed this extension https://addons.mozilla.org/en-US/firefox/addon/fakespot-fake-reviews-amazon/ Its made by mozilla and its updated just a month ago

image

It works perfectly.

Even this brand new addon works perfectly https://addons.mozilla.org/en-US/firefox/addon/commonplace/versions/?utm_content=search&utm_medium=referral&utm_source=addons.mozilla.org

mavink commented 2 weeks ago

Even this extension which first caused the issue - https://addons.mozilla.org/en-US/firefox/addon/search-on-imdb-context-menu/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search as reported here https://github.com/onemen/TabMixPlus/discussions/292 installs and works perfectly. I am changing only the config.js file not the other files which you have updated.

117649 commented 2 weeks ago

Which addon doesnt work after disabling sign check? I have installed after disabling sign check. addons install and work

You're just lucky that those .xpi were not updated by mozilla. And we won't be bothered to test every .xpi on their site. We know there is and its enough.

I really can't understand what you are talking about. I just installed this extension https://addons.mozilla.org/en-US/firefox/addon/fakespot-fake-reviews-amazon/ Its made by mozilla and its updated just a month ago

image

It works perfectly.

Even this brand new addon works perfectly https://addons.mozilla.org/en-US/firefox/addon/commonplace/versions/?utm_content=search&utm_medium=referral&utm_source=addons.mozilla.org

That is just a you problem. Mozilla did it once then its doesn't matter its now does not. One time is one time too more. By the way disable sign requirement does not guarantee no sign check is performed ever. It still may occur under certain circumstances in the past. And that caused us problems. Exclusion condition still is a much reliable and effort saving way for us to do it. This repo is mainly about legacy add-ons privileged WebEx isn't what we really care much about.