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/io/12_io.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/io') diff --git a/ext/io/12_io.js b/ext/io/12_io.js index 094868371..5c31c279b 100644 --- a/ext/io/12_io.js +++ b/ext/io/12_io.js @@ -228,7 +228,7 @@ class Stdin { return this.#readable; } - setRaw(mode, options = {}) { + setRaw(mode, options = { __proto__: null }) { const cbreak = !!(options.cbreak ?? false); op_set_raw(this.#rid, mode, cbreak); } -- cgit v1.2.3