From 8b5c8e65129f770428ac410e11a8f3a826838950 Mon Sep 17 00:00:00 2001 From: hydRAnger Date: Mon, 21 Jun 2021 15:01:12 +0900 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 c2b2e7c26..e7f75c20f 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -87,7 +87,7 @@ const Utils = { 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);