Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! lib: make Error instantiation less vulnerable to prototype p…
…ollution
  • Loading branch information
aduh95 committed Jan 2, 2023
commit 2e892fcfe9569b2be2a429cf1390ca6d432e2cd3
14 changes: 7 additions & 7 deletions lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ class SystemError extends Error {
captureLargerStackTrace(this);

ObjectDefineProperties(this, {
code: {
__proto__: null,
value: key,
enumerable: true,
writable: true,
configurable: true,
},
[kIsNodeError]: {
__proto__: null,
value: true,
Expand All @@ -276,13 +283,6 @@ class SystemError extends Error {
writable: true,
configurable: true,
},
code: {
__proto__: null,
value: key,
enumerable: true,
writable: true,
configurable: true,
},
info: {
__proto__: null,
value: context,
Expand Down