Safer cookie-less check for unrestricted tabs from subdocuments.

This commit is contained in:
hackademix 2018-12-27 10:53:53 +01:00
parent 67312d0385
commit c0956b20b9
1 changed files with 9 additions and 4 deletions

View File

@ -70,10 +70,15 @@
// or the cookie might have been deleted in a race condition, // or the cookie might have been deleted in a race condition,
// so here we try to check the parent // so here we try to check the parent
let checkParent = parent.wrappedJSObject.checkNoScriptUnrestricted; let checkParent = parent.wrappedJSObject.checkNoScriptUnrestricted;
if (checkParent) { if (typeof checkParent === "function") {
let challenge = uuid(); try {
let unrestricted = checkParent(challenge) === checkUnrestricted(challenge); let challenge = uuid();
this.config.tabInfo = {unrestricted, inherited: true}; let unrestricted = checkParent(challenge) === checkUnrestricted(challenge);
this.config.tabInfo = {unrestricted, inherited: true};
} catch (e) {
debug("Exception thrown while checking parent unrestricted tab marker. Something fishy going on...")
error(e);
}
} }
} }
} }