#385 - force unsafe URL loading to enable TB155 compatibility - #386
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates subscript loading to explicitly opt into unsafe URL loading via Services.scriptloader.loadSubScriptWithOptions(), restoring compatibility with Thunderbird 155+ where loadSubScript() rejects jar:/file: URIs (per Bug 1974213).
Changes:
- Replaced
loadSubScript()withloadSubScriptWithOptions()(usingallowUnsafeURL: true) for key scripts loaded from the extension package. - Added early-startup handling in
logDebug()to avoid consulting preferences before they’re initialized.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| chrome/content/qFilters-utils.js | Switches two subscript loads to loadSubScriptWithOptions(…, { allowUnsafeURL: true }) and adjusts early-startup debug logging. |
| chrome/content/api/WindowListener/implementation.js | Introduces a loadSubScript() wrapper using loadSubScriptWithOptions() and updates call sites to use it. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+312
to
+315
| { | ||
| target: window, | ||
| allowUnsafeURL: true, | ||
| } |
| // qFilters-preferences.js subscript has finished loading. We cannot yet | ||
| // consult the debug preference, so preserve the diagnostic unconditionally. | ||
| if (!qF?.Preferences) { | ||
| this.logToConsole("quickFilters [preferences not initialized]", ...args); |
Comment on lines
+3450
to
+3453
| { | ||
| target: quickFilters.Util, | ||
| allowUnsafeURL: true, | ||
| } |
Comment on lines
+52
to
+55
| return Services.scriptloader.loadSubScriptWithOptions(url, { | ||
| target, | ||
| allowUnsafeURL: true, | ||
| }); |
Owner
Author
|
Prerelease, tested on Thunderbird Daily 155.0a1 (2026-08-12) (64-bit) To install the version above, download the zip file and then drag the file into Thunderbird Add-ons Manager. Do not extract contents, it will not install that way. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
using
loadSubScriptWithOptions()to force unsafe URL. This is to fix the Add-on not loading anymore in Thunderbird 155 Daily because untrusted URI issues caused by Bug 1974213 "Don't allow file: and jar: schemes inServices.scriptloader.loadSubScript"