Skip to content

Commit

Permalink
events: 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>

PR-URL: #39773
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
jasnell authored and targos committed Sep 6, 2021
1 parent cfbe906 commit a4b8c13
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 a4b8c13

Please sign in to comment.