Skip to content

Commit

Permalink
event_target: protect property defs against prototype polution
Browse files Browse the repository at this point in the history
Signed-off-by: James M Snell <jasnell@gmail.com>
  • Loading branch information
jasnell committed Aug 16, 2021
1 parent 5a9deb4 commit ae8fe16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/internal/worker/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
origin: {
get() {
Expand All @@ -151,6 +152,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
lastEventId: {
get() {
Expand All @@ -160,6 +162,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
source: {
get() {
Expand All @@ -169,6 +172,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
ports: {
get() {
Expand All @@ -178,6 +182,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
});

Expand Down

0 comments on commit ae8fe16

Please sign in to comment.