Server-site navigator protection did not respect whitelisting

Should fix #362
This commit is contained in:
kkapsner 2019-05-30 12:43:47 +02:00
parent 579b778062
commit 27999484c2
3 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@
const settings = require("./settings");
const logging = require("./logging");
const check = require("./check");
scope.allProperties = [
"appCodeName", "appName",
@ -67,8 +68,10 @@
};
function changeHTTPHeader(details){
const url = new URL(details.url);
if (
settings.protectNavigator &&
settings.get("protectNavigator", url) &&
check.check({url}).mode !== "allow" &&
(
!settings.protectedAPIFeatures.hasOwnProperty("userAgent") ||
settings.protectedAPIFeatures.userAgent

View File

@ -18,6 +18,8 @@
"lib/settings.js",
"lib/lists.js",
"lib/persistentRndStorage.js",
"lib/callingStack.js",
"lib/check.js",
"lib/dataUrls.js",
"lib/notification.js",
"lib/navigator.js",

View File

@ -13,6 +13,7 @@ Version 0.5.10:
- detection over document.write and document.writeln was possible
- google docs were broken in Waterfox
- MutationObserver failed in some instances
- server-site navigator protection did not respect whitelisting
known issues:
- if a data URL is blocked the page action button does not appear