[fix] embededworker

This commit is contained in:
kwaroran
2023-11-29 00:51:19 +09:00
parent 29bc4a8348
commit bc302a5589

View File

@@ -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{
} }