[fix] embededworker
This commit is contained in:
@@ -79,7 +79,7 @@ const whitelist = [
|
|||||||
|
|
||||||
const evaluation = globaly.eval
|
const evaluation = globaly.eval
|
||||||
|
|
||||||
const prop = Object.getOwnPropertyNames( globaly )
|
const prop = Object.getOwnPropertyNames( globaly ).concat( Object.getOwnPropertyNames( this ))
|
||||||
prop.push(
|
prop.push(
|
||||||
//unsafe apis
|
//unsafe apis
|
||||||
'open',
|
'open',
|
||||||
@@ -114,6 +114,16 @@ prop.forEach( function( prop ) {
|
|||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
Object.defineProperty( this, prop, {
|
||||||
|
get : function() {
|
||||||
|
throw "Security Exception: cannot access "+prop;
|
||||||
|
return 1;
|
||||||
|
},
|
||||||
|
configurable : false
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user