ma1 pushed to branch tor-browser-153.0esr-16.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
eff748cd
by hackademix at 2026-07-29T18:50:33+02:00
2 changed files:
- toolkit/components/extensions/Extension.sys.mjs
- toolkit/mozapps/extensions/content/components/addon-permissions-list.mjs
Changes:
| ... | ... | @@ -4366,12 +4366,14 @@ export class Extension extends ExtensionData { |
| 4366 | 4366 | }
|
| 4367 | 4367 | |
| 4368 | 4368 | // tor-browser#40253: Explicitly allow NoScript in Private Browsing mode.
|
| 4369 | + // tor-browser#45157: Grant "access local files" permission to NoScript.
|
|
| 4369 | 4370 | if (this.isNoScript) {
|
| 4370 | 4371 | lazy.ExtensionPermissions.add(this.id, {
|
| 4371 | - permissions: [PRIVATE_ALLOWED_PERMISSION],
|
|
| 4372 | + permissions: [PRIVATE_ALLOWED_PERMISSION, "internal:fileSchemeAllowed"],
|
|
| 4372 | 4373 | origins: [],
|
| 4373 | 4374 | });
|
| 4374 | 4375 | this.permissions.add(PRIVATE_ALLOWED_PERMISSION);
|
| 4376 | + this.permissions.add("internal:fileSchemeAllowed");
|
|
| 4375 | 4377 | }
|
| 4376 | 4378 | |
| 4377 | 4379 | // We only want to update the SVG_CONTEXT_PROPERTIES_PERMISSION during
|
| ... | ... | @@ -87,7 +87,15 @@ class AddonPermissionsList extends AboutAddonsHTMLElement { |
| 87 | 87 | },
|
| 88 | 88 | {
|
| 89 | 89 | buildOptionalOrigins: true,
|
| 90 | - includeFileSchemeAccess: lazy.fileSchemeAccessRequiresOptIn,
|
|
| 90 | + // tor-browser#45157: prevent "access local files" from being accidentally
|
|
| 91 | + // toggled off in NoScript, causing Safer and Safest security levels to
|
|
| 92 | + // fail on file:// URLs.
|
|
| 93 | + includeFileSchemeAccess:
|
|
| 94 | + lazy.fileSchemeAccessRequiresOptIn &&
|
|
| 95 | + !(
|
|
| 96 | + fileSchemeAllowed &&
|
|
| 97 | + this.addon.id == "{73a6fe31-595d-460b-a920-fcc0f8843232}"
|
|
| 98 | + ),
|
|
| 91 | 99 | }
|
| 92 | 100 | );
|
| 93 | 101 | let optionalEntries = [
|