src: throw on process.env symbol usage#9446
Merged
cjihrig merged 1 commit intonodejs:masterfrom Nov 7, 2016
Merged
Conversation
bnoordhuis
approved these changes
Nov 3, 2016
Member
There was a problem hiding this comment.
Can you also add a symbol in process.env test?
Member
|
LGTM. @AnnaMag, this is based on your change to use the |
jasnell
approved these changes
Nov 3, 2016
Member
jasnell
left a comment
There was a problem hiding this comment.
I'd prefer a more specific error message but this LGTM
Contributor
Author
|
Added requested test. CI: https://ci.nodejs.org/job/node-test-pull-request/4778/ |
Contributor
Author
|
The first CI run was green minus related failures on Windows. Pushed a second commit with Windows only fixes. Second CI run passed on Windows: https://ci.nodejs.org/job/node-test-commit/5915/ The failures on the second run seem to be unrelated, as the second commit only touched Windows code. PTAL at the second commit. |
Contributor
|
LGTM |
danbev
approved these changes
Nov 4, 2016
JungMinu
approved these changes
Nov 4, 2016
bnoordhuis
approved these changes
Nov 4, 2016
This commit causes process.env to throw when a symbol is used as either a key or a value. Fixes: nodejs#9429 PR-URL: nodejs#9446 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
addaleax
added a commit
that referenced
this pull request
Nov 20, 2016
1aa595e introduced a `throw` for accessing `Symbol` properties of `process.env`. However, this breaks `util.inspect(process)` and things like `Object.prototype.toString.call(process.env)`, so this patch changes the behaviour for the getter to just always return `undefined`. Ref: #9446 Fixes: #9641 PR-URL: #9631 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas
pushed a commit
to italoacasas/node
that referenced
this pull request
Jan 18, 2017
This commit causes process.env to throw when a symbol is used as either a key or a value. Fixes: nodejs#9429 PR-URL: nodejs#9446 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
italoacasas
pushed a commit
to italoacasas/node
that referenced
this pull request
Jan 18, 2017
1aa595e introduced a `throw` for accessing `Symbol` properties of `process.env`. However, this breaks `util.inspect(process)` and things like `Object.prototype.toString.call(process.env)`, so this patch changes the behaviour for the getter to just always return `undefined`. Ref: nodejs#9446 Fixes: nodejs#9641 PR-URL: nodejs#9631 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
src
Description of change
This commit causes
process.envto throw when a symbol is used as either a key or a value.Fixes: #9429