diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-29 16:32:39 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-29 16:33:45 -0400 |
commit | 69dfb9ba591ac76a23ecbec4b550bb20f83202a9 (patch) | |
tree | eff2ead881e4c5d14d8483115d5099531e74dce6 | |
parent | dbc8d7b9a632fa47cec7a8d37aaa8c4efd871405 (diff) |
client: initInfo: prevent extensions on special clientInfo keys
As well as clientInfo itself.
-rw-r--r-- | src/static/client3.js | 10 |
1 files changed, 10 insertions, 0 deletions
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; |