Skip to content

Commit 6649da8

Browse files
committed
Remove "fetch" capability from DEFAULT preset unless "script" is there too (thanks Security Research Labs for suggestion).
1 parent f0e5abd commit 6649da8

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/bg/LifeCycle.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,17 @@ var LifeCycle = (() => {
396396
// add the wasm capability to any preset which already has the script capability
397397
await configureNewCap("wasm", ["DEFAULT", "TRUSTED", "CUSTOM"], caps => caps.has("script"));
398398
}
399+
400+
if (Ver.is(previousVersion, "<=", "13.6.15")) {
401+
// remove the "fetch" capability from DEFAULT unless "script" is there
402+
await forEachPreset(({ capabilities }) => {
403+
if (capabilities.has("fetch") && !capabilities.has("script")) {
404+
capabilities.delete("fetch");
405+
return true;
406+
}
407+
return false;
408+
}, ["DEFAULT"]);
409+
}
399410
},
400411

401412
async onUpdateAvailable(details) {

src/nscl

0 commit comments

Comments
 (0)