Pass a triggering principal when launching non-HTTP URLs
Some checks failed
CI / Detect changes (push) Has been cancelled
CI / Utilities Tests (push) Has been cancelled
CI / Build, Upload (push) Has been cancelled
CI / Test (macOS NFS) (push) Has been cancelled
CI / Test (Windows x64) (push) Has been cancelled
CI / Test () (push) Has been cancelled
CI / Test (Windows arm64) (push) Has been cancelled

Gecko 140.15 made nsIExternalProtocolService.loadURI()'s triggering
principal mandatory, so Zotero.launchURL() threw NS_ERROR_ILLEGAL_VALUE
for any scheme handled by an external app.

https://forums.zotero.org/discussion/133709/
This commit is contained in:
Dan Stillman 2026-09-11 14:31:41 -04:00
parent ab34e9031a
commit 3c959e1012

View file

@ -1257,7 +1257,10 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
Zotero.Utilities.Internal.Environment.clearMozillaVariables();
}
svc.loadURI(Services.io.newURI(url, null, null));
svc.loadURI(
Services.io.newURI(url, null, null),
Services.scriptSecurityManager.getSystemPrincipal(),
);
return;
}
}