Skip to content
Permalink
Browse files Browse the repository at this point in the history
Security fix for Prototype Pollution
  • Loading branch information
arjunshibu committed Dec 17, 2020
1 parent 3931356 commit 2aced17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Expand Up @@ -46,6 +46,8 @@ function override(...rawArgs) {
});
} else {
Object.keys(obj).forEach(key => {
if (key == '__proto__' || key == 'constructor' || key == 'prototype')
return
src = target[key];
val = obj[key];
if (val === target) {
Expand All @@ -69,4 +71,4 @@ function override(...rawArgs) {
return target;
}

module.exports = override;
module.exports = override;

0 comments on commit 2aced17

Please sign in to comment.