Fixed infinite reload loop on unrestricted tabs.

This commit is contained in:
hackademix 2018-08-24 22:16:10 +02:00
parent fc92be83c3
commit 7913e29a92
1 changed files with 2 additions and 2 deletions

View File

@ -462,7 +462,7 @@ var RequestGuard = (() => {
}
if (header) {
pending.cspHeader = header;
if (blocker) pending.cspHeader = header;
if (!hasReportTo) {
responseHeaders.push(REPORT_TO);
}
@ -489,7 +489,7 @@ var RequestGuard = (() => {
if (pending) {
pending.scriptBlocked = scriptBlocked;
if (!(pending.headersProcessed &&
(scriptBlocked || ns.policy.can(url, "script", request.documentURL))
(scriptBlocked || !ns.isEnforced(tabId) || ns.policy.can(url, "script", request.documentURL))
)) {
debug("[WARNING] onHeadersReceived %s %o", frameId, tabId,
pending.headersProcessed ? "has been overridden on": "could not process",