From 60c299c4f1b1abb2f494c04d6b42aa683ef0098c Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 23 Aug 2018 17:09:26 +0200 Subject: Update ChildPolicies when automatic temp TRUST for top-level document s is enabled. --- src/bg/RequestGuard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bg') diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index e6be19e..db34f4b 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -364,7 +364,7 @@ var RequestGuard = (() => { return ALLOW; }, - onHeadersReceived(request) { + async onHeadersReceived(request) { // called for main_frame, sub_frame and object // check for duplicate calls @@ -389,12 +389,12 @@ var RequestGuard = (() => { } } - if (ns.isEnforced(tabId)) { let policy = ns.policy; let perms = policy.get(url, documentUrl).perms; if (policy.autoAllowTop && request.type === "main_frame" && perms === policy.DEFAULT) { policy.set(Sites.optimalKey(url), perms = policy.TRUSTED.tempTwin); + await ChildPolicies.update(policy); } let {capabilities} = perms; -- cgit v1.2.3