Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--disallow-code-generation-from-strings doesn't work with NODE_OPTIONS #30089

Closed
milutin-apostol opened this issue Oct 23, 2019 · 3 comments
Closed
Assignees
Labels
feature request Issues that request new features to be added to Node.js. security Issues and PRs related to security. v8 engine Issues and PRs related to the V8 dependency.

Comments

@milutin-apostol
Copy link

Hello.

Working: node --disallow-code-generation-from-strings index.js
Not working: NODE_OPTIONS=--disallow-code-generation-from-strings node index.js

Im getting error: node: --disallow-code-generation-from-strings is not allowed in NODE_OPTIONS

So its not possible to set --disallow-code-generation-from-strings in NODE_OPTIONS var.

Is this by design?

Thank you.

@sam-github
Copy link
Contributor

Yes, its documented: https://nodejs.org/api/cli.html#cli_node_path_path (look above that link at the list, there is no direct link)

And perhaps no.... we have to explicitly whitelist v8 options we want to allow, see PerIsolateOptionsParser::PerIsolateOptionsParser in src/node_options.cc

Consider PRing a change to allow this one, it seems reasonable to me.

@sam-github sam-github added feature request Issues that request new features to be added to Node.js. security Issues and PRs related to security. v8 engine Issues and PRs related to the V8 dependency. labels Oct 23, 2019
@codebytere
Copy link
Member

I might grab this one if that's cool, it seems fairly straightforward :)

@codebytere
Copy link
Member

Closed in #30094.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. security Issues and PRs related to security. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants