vm2 icon indicating copy to clipboard operation
vm2 copied to clipboard

contextCodeGeneration option in Node.js 10+

Open sebastien-ma opened this issue 7 years ago • 1 comments

There's a new option since Node.js 10.x to disallow the context code generation. It's helpful since I found context code generation is so evil. I wonder if it is set to false by default or surfaced as an option in vm2?

contextCodeGeneration

strings If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) will throw an EvalError. Default: true. wasm If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. Default: true.

https://nodejs.org/docs/latest-v10.x/api/vm.html#vm_script_runinnewcontext_sandbox_options

sebastien-ma avatar Apr 17 '19 23:04 sebastien-ma

Thanks for bringing that to my attention, implemented in 3.8.0.

patriksimek avatar Apr 21 '19 21:04 patriksimek