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/fetch/23_request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/fetch/23_request.js') diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js index 873d05a2b..adebe13b3 100644 --- a/ext/fetch/23_request.js +++ b/ext/fetch/23_request.js @@ -300,7 +300,7 @@ class Request { * @param {RequestInfo} input * @param {RequestInit} init */ - constructor(input, init = {}) { + constructor(input, init = { __proto__: null }) { if (input === _brand) { this[_brand] = _brand; return; -- cgit v1.2.3