Skip to content

Commit a4b8c13

Browse files
jasnelltargos
authored andcommitted
events: protect property defs against prototype polution
Signed-off-by: James M Snell <[email protected]> PR-URL: #39773 Reviewed-By: Antoine du Hamel <[email protected]>
1 parent cfbe906 commit a4b8c13

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/internal/worker/io.js

+5
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
142142
},
143143
enumerable: true,
144144
configurable: true,
145+
set: undefined,
145146
},
146147
origin: {
147148
get() {
@@ -151,6 +152,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
151152
},
152153
enumerable: true,
153154
configurable: true,
155+
set: undefined,
154156
},
155157
lastEventId: {
156158
get() {
@@ -160,6 +162,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
160162
},
161163
enumerable: true,
162164
configurable: true,
165+
set: undefined,
163166
},
164167
source: {
165168
get() {
@@ -169,6 +172,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
169172
},
170173
enumerable: true,
171174
configurable: true,
175+
set: undefined,
172176
},
173177
ports: {
174178
get() {
@@ -178,6 +182,7 @@ ObjectDefineProperties(MessageEvent.prototype, {
178182
},
179183
enumerable: true,
180184
configurable: true,
185+
set: undefined,
181186
},
182187
});
183188

0 commit comments

Comments
 (0)