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>
jasnell authored and targos committed Sep 6, 2021

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
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
@@ -142,6 +142,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
origin: {
get() {
@@ -151,6 +152,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
lastEventId: {
get() {
@@ -160,6 +162,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
source: {
get() {
@@ -169,6 +172,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
ports: {
get() {
@@ -178,6 +182,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
},
enumerable: true,
configurable: true,
set: undefined,
},
});

0 comments on commit a4b8c13

Please sign in to comment.