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