mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Harden abort-current-inline-script scriplet
Related issue: - https://github.com/uBlockOrigin/uAssets/issues/6929
This commit is contained in:
parent
a806dd4bd2
commit
1a8571755e
@ -55,11 +55,16 @@
|
|||||||
owner = owner[prop];
|
owner = owner[prop];
|
||||||
if ( owner instanceof Object === false ) { return; }
|
if ( owner instanceof Object === false ) { return; }
|
||||||
}
|
}
|
||||||
|
let value;
|
||||||
const desc = Object.getOwnPropertyDescriptor(owner, prop);
|
const desc = Object.getOwnPropertyDescriptor(owner, prop);
|
||||||
if ( desc && desc.get !== undefined ) { return; }
|
if (
|
||||||
|
desc instanceof Object === false ||
|
||||||
|
desc.get instanceof Function === false
|
||||||
|
) {
|
||||||
|
value = owner[prop];
|
||||||
|
}
|
||||||
const magic = String.fromCharCode(Date.now() % 26 + 97) +
|
const magic = String.fromCharCode(Date.now() % 26 + 97) +
|
||||||
Math.floor(Math.random() * 982451653 + 982451653).toString(36);
|
Math.floor(Math.random() * 982451653 + 982451653).toString(36);
|
||||||
let value = owner[prop];
|
|
||||||
const validate = function() {
|
const validate = function() {
|
||||||
const e = document.currentScript;
|
const e = document.currentScript;
|
||||||
if (
|
if (
|
||||||
|
Loading…
Reference in New Issue
Block a user