mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-05-15 17:03:23 +02:00
Server-site navigator protection did not respect whitelisting
Should fix #362
This commit is contained in:
parent
579b778062
commit
27999484c2
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
const settings = require("./settings");
|
const settings = require("./settings");
|
||||||
const logging = require("./logging");
|
const logging = require("./logging");
|
||||||
|
const check = require("./check");
|
||||||
|
|
||||||
scope.allProperties = [
|
scope.allProperties = [
|
||||||
"appCodeName", "appName",
|
"appCodeName", "appName",
|
||||||
@ -67,8 +68,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
function changeHTTPHeader(details){
|
function changeHTTPHeader(details){
|
||||||
|
const url = new URL(details.url);
|
||||||
if (
|
if (
|
||||||
settings.protectNavigator &&
|
settings.get("protectNavigator", url) &&
|
||||||
|
check.check({url}).mode !== "allow" &&
|
||||||
(
|
(
|
||||||
!settings.protectedAPIFeatures.hasOwnProperty("userAgent") ||
|
!settings.protectedAPIFeatures.hasOwnProperty("userAgent") ||
|
||||||
settings.protectedAPIFeatures.userAgent
|
settings.protectedAPIFeatures.userAgent
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
"lib/settings.js",
|
"lib/settings.js",
|
||||||
"lib/lists.js",
|
"lib/lists.js",
|
||||||
"lib/persistentRndStorage.js",
|
"lib/persistentRndStorage.js",
|
||||||
|
"lib/callingStack.js",
|
||||||
|
"lib/check.js",
|
||||||
"lib/dataUrls.js",
|
"lib/dataUrls.js",
|
||||||
"lib/notification.js",
|
"lib/notification.js",
|
||||||
"lib/navigator.js",
|
"lib/navigator.js",
|
||||||
|
@ -13,6 +13,7 @@ Version 0.5.10:
|
|||||||
- detection over document.write and document.writeln was possible
|
- detection over document.write and document.writeln was possible
|
||||||
- google docs were broken in Waterfox
|
- google docs were broken in Waterfox
|
||||||
- MutationObserver failed in some instances
|
- MutationObserver failed in some instances
|
||||||
|
- server-site navigator protection did not respect whitelisting
|
||||||
|
|
||||||
known issues:
|
known issues:
|
||||||
- if a data URL is blocked the page action button does not appear
|
- if a data URL is blocked the page action button does not appear
|
||||||
|
Loading…
x
Reference in New Issue
Block a user