Skip to content

cli: whitelist new V8 flag in NODE_OPTIONS

Resolves https://github.com/nodejs/node/issues/30089.

Explicitly whitelists --disallow-code-generation-from-strings in NODE_OPTIONS as a new V8 flag. This flag prevents strings like eval() from performing code generation.

Before:

node on git:whitelist-node-option ❯ node ~/Desktop/index.js
node: --disallow-code-generation-from-strings is not allowed in NODE_OPTIONS

After:

node on git:whitelist-node-option ❯ out/Release/node ~/Desktop/index.js
hello
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading