From 69dfb9ba591ac76a23ecbec4b550bb20f83202a9 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 29 Dec 2023 16:32:39 -0400 Subject: client: initInfo: prevent extensions on special clientInfo keys As well as clientInfo itself. --- src/static/client3.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/static/client3.js b/src/static/client3.js index b710b2bd..4dab19d1 100644 --- a/src/static/client3.js +++ b/src/static/client3.js @@ -22,6 +22,16 @@ const clientSteps = { function initInfo(key, description) { const object = {...description}; + for (const obj of [ + object, + object.state, + object.setting, + object.event, + ]) { + if (!obj) continue; + Object.preventExtensions(obj); + } + clientInfo[key] = object; return object; -- cgit 1.3.0-6-gf8a5