browserclaw 0.11.1 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1218,11 +1218,14 @@ function safeWriteJson(filePath, data) {
1218
1218
  function setDeep(obj, keys, value) {
1219
1219
  let node = obj;
1220
1220
  for (const key of keys.slice(0, -1)) {
1221
+ if (key === "__proto__" || key === "constructor" || key === "prototype") return;
1221
1222
  const next = node[key];
1222
1223
  if (typeof next !== "object" || next === null || Array.isArray(next)) node[key] = {};
1223
1224
  node = node[key];
1224
1225
  }
1225
- node[keys[keys.length - 1]] = value;
1226
+ const lastKey = keys[keys.length - 1];
1227
+ if (lastKey === "__proto__" || lastKey === "constructor" || lastKey === "prototype") return;
1228
+ node[lastKey] = value;
1226
1229
  }
1227
1230
  function parseHexRgbToSignedArgbInt(hex) {
1228
1231
  const cleaned = hex.trim().replace(/^#/, "");