rehanift/engine.js — Issue #6: Calling a context function's constructor will evaluate arbitrary code outside of the sandbox
Author: rehanift
Created: 2012-01-05 16:15:35+00:00
State: open

Start server with `node script/server.js` then run

```javascript
var engine = require("engine.js").engine;

var client = engine.client.create();

var task = client.createTask();
task.setContext('(function(){ return {} })');
task.setCode("console.log(console.log.constructor('return process')())");
task.setLocals({});

task.on('eval', function(data){
console.log(data);
});

task.on('output', function(data){
console.log(data);
});

task.run();
```