From 9dad2739b7474f383474773d5ab898a0c29ac178 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Thu, 25 Mar 2021 11:45:49 +0300 Subject: [PATCH] fix(core): fixed __proto__ pollution --- src/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/utils.js b/src/utils/utils.js index 4c9348634..4134f737f 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -92,7 +92,7 @@ function extend(...args) { for (let i = 1; i < args.length; i += 1) { const nextSource = args[i]; if (nextSource !== undefined && nextSource !== null) { - const keysArray = Object.keys(Object(nextSource)); + const keysArray = Object.keys(Object(nextSource)).filter((key) => key !== '__proto__'); for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { const nextKey = keysArray[nextIndex]; const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);