Skip to content

Commit

Permalink
chore: guard against prototype pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Mar 22, 2022
1 parent 2b888f9 commit 359c883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis/conversion/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const setValue = (data, reference, value) => {
dataContainer = dataContainer[step];
}

if (typeof value !== 'undefined') {
if (typeof value !== 'undefined' && propertyName !== '__proto__' && propertyName !== 'constructor') {
dataContainer[propertyName] = value;
} else {
delete dataContainer[propertyName];
Expand Down

0 comments on commit 359c883

Please sign in to comment.