Skip to content

Commit

Permalink
fix(merge): prevent possible prototype pollution (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l authored May 3, 2022
1 parent 56923fe commit 2d156c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export function merge(a, b, k) {
}
} else {
for (k in b) {
if (k === '__proto__' || k === 'constructor' || k === 'prototype') break;
a[k] = merge(a[k], b[k]);
}
}
Expand Down

0 comments on commit 2d156c7

Please sign in to comment.