From 31c3180d2550baf1ca4f0dc4739ed2d78ff8b1bf Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 20 May 2022 09:07:22 -0700 Subject: [PATCH] fix: do not let setProperty change the prototype --- src/util.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util.js b/src/util.js index 5ae88cc7f..6b12effdc 100644 --- a/src/util.js +++ b/src/util.js @@ -176,6 +176,9 @@ util.decorateEnum = function decorateEnum(object) { util.setProperty = function setProperty(dst, path, value) { function setProp(dst, path, value) { var part = path.shift(); + if (part === "__proto__") { + return; + } if (path.length > 0) { dst[part] = setProp(dst[part] || {}, path, value); } else {