RUN THIS SCRIPT AT YOUR OWN RISK
This is for addons signature expiry of firefox in 2025-03-15. Not recommended unless you understand the security risks.
If you are not running Firefox ESR with xpinstall.signatures.required
set to false
i.e. normal firefox, then you have some steps to follow first to tweak your firefox, your OS's methods may vary:
This script is to be run in firefox developer console.
Works for some newer version (2024+) of firefox, so you may have to tweak as needed for your firefox version e.g. ChromeUtils
to Components
.
- may need to run special developer console
Ctrl-Shift-J
- may need to set
devtools.chrome.enabled
totrue
inabout:config
credits goes to:
- https://www.reddit.com/r/firefox/comments/1jbhi1v/comment/mhv0lst/
- https://news.ycombinator.com/item?id=19824410
Addons may be automaticallly re-verified and re-disabled due to default timer of 24 hours set in the settings.
You may want to find const XPI_SIGNATURE_CHECK_PERIOD = 24 * 60 * 60;
in omni.ja
's ./modules/addons/XPIProvider.jsm
to edit accordingly.
You may also want to look at verifySignatures()
in omni.ja
's ./modules/addons/XPIPDatabase.jsm
You may need to find the files in other locations in different version of firefox.
Some users reported that in certain firefox versions, the edits to omni.ja doesn't work, as there's a precompiled version somewhere.
credits: https://www.reddit.com/r/firefox/comments/1jbhi1v/comment/mi243z7/
credits: https://christopherstanton.net/articles/firefox_cert_25.php
reproducing the content excerpt:
- Remove the verification function:
Open XPIInstall.jsm (or the file you extracted) with a text editor and search for the text string verifySignedState. You should be directed to a function somewhat like the following:
async verifySignedState(addonId, addonType, addonLocation) { if (!shouldVerifySignedState(addonType, addonLocation)) { return { signedState: AddonManager.SIGNEDSTATE_NOT_REQUIRED, cert: null, }; } let root = Ci.nsIX509CertDB.AddonsPublicRoot; if ( !AppConstants.MOZ_REQUIRE_SIGNING && Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false) ) { root = Ci.nsIX509CertDB.AddonsStageRoot; } return this.verifySignedStateForRoot(addonId, root); }
If you cannot find this function, try searching for SIGNEDSTATE as displayed above. For older Firefox versions, this function may be in a different file such as XPIProvider or AddonSettings. Keep extracting and searching until you find the right one.
Once you have found the correct function, prepend every line in the function with comments // like so, leaving the SIGNEDSTATE_NOT_REQUIRED return statement unchanged:
async verifySignedState(addonId, addonType, addonLocation) { //if (!shouldVerifySignedState(addonType, addonLocation)) { return { signedState: AddonManager.SIGNEDSTATE_NOT_REQUIRED, cert: null, }; //} //let root = Ci.nsIX509CertDB.AddonsPublicRoot; //if ( // !AppConstants.MOZ_REQUIRE_SIGNING && // Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false) //) { // root = Ci.nsIX509CertDB.AddonsStageRoot; //} //return this.verifySignedStateForRoot(addonId, root); }
The comments are basically telling the application "ignore this line", so you can can also just replace the function entirely like so. The result will be the same either way:
async verifySignedState(addonId, addonType, addonLocation) { return { signedState: AddonManager.SIGNEDSTATE_NOT_REQUIRED, cert: null, }; }
After changing the function, save the file and reinsert it into omni.ja (on your desktop). Save the archive as needed; most tools automatically save whenever you reinsert a file.
Move the modified omni.ja back into your Firefox installation directory, overwriting the file that is already there (you did back up the file first, right?).
RUN THIS SCRIPT AT YOUR OWN RISK