From 971f09abe486185247e1faf4e8d1419ba2506b8d Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 23 May 2024 00:03:35 +0200 Subject: fix(runtime): use more null proto objects (#23921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a primordialization effort to improve resistance against users tampering with the global `Object` prototype. --------- Co-authored-by: Bartek IwaƄczuk --- ext/websocket/02_websocketstream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/websocket/02_websocketstream.js') diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index 01aef45d3..92b1c6eae 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -474,7 +474,7 @@ class WebSocketError extends DOMException { #closeCode; #reason; - constructor(message = "", init = {}) { + constructor(message = "", init = { __proto__: null }) { super(message, "WebSocketError"); this[webidl.brand] = webidl.brand; -- cgit v1.2.3