Skip to content

Commit

Permalink
fix: fixed prototype pollution issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kobezzza committed Mar 10, 2023
1 parent aacbd7f commit d3d9376
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/iterators/extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ Collection.prototype.extend = function (deepOrParams, args) {
isSimple = simpleType[getType(arg)];

promise = promise.then(() => $C(arg).forEach((el, key) => {
if (key === '__proto__') {
return;
}

if (dataIsSimple && isSimple && (withDescriptor || p.withAccessors && (el.get || el.set))) {
if (p.traits && key in data !== (p.traits === -1)) {
return;
Expand Down

0 comments on commit d3d9376

Please sign in to comment.