From 97855e622b6dcd117c77e6583701962ff45e7338 Mon Sep 17 00:00:00 2001 From: Ben Drucker Date: Fri, 14 Oct 2022 10:27:41 -0700 Subject: [PATCH] resolve-shims: prevent prototype manipulation (#246) --- lib/resolve-shims.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/resolve-shims.js b/lib/resolve-shims.js index cb634fe..c6650eb 100644 --- a/lib/resolve-shims.js +++ b/lib/resolve-shims.js @@ -123,6 +123,11 @@ function separateExposeGlobals(shims) { , exposeGlobals = {}; Object.keys(shims).forEach(function (k) { + // https://github.com/thlorenz/browserify-shim/issues/245 + if (k === '__proto__' || k === 'constructor') { + return; + } + var val = shims[k] , exp = val && val.exports;