Skip to content

Commit

Permalink
Merge pull request #9 from github/jibrang/fix-prototype-polluting-ass…
Browse files Browse the repository at this point in the history
…ignment

Fix prototype polluting assignment
  • Loading branch information
jibrang authored Aug 30, 2024
2 parents 688aa81 + 92586fa commit 3f17eb1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions target/braintree-1.3.10.js
Original file line number Diff line number Diff line change
Expand Up @@ -2366,8 +2366,12 @@ sjcl.random = {
}
}

const forbiddenKeys = ['__proto__', 'constructor', 'prototype'];
for (i=0; i<jsTemp.length; i++) {
j = jsTemp[i];
if (forbiddenKeys.includes(j)) {
continue;
}
delete cbs[j];
}
},
Expand Down

0 comments on commit 3f17eb1

Please sign in to comment.