Skip to content

Commit

Permalink
Merge pull request from GHSA-3hw5-q855-g6cw
Browse files Browse the repository at this point in the history
Prevent the special __proto__ property name from being mixed in to
prevent polluting the prototoype of the object being mixed into in the
jqMix function in jq.js
  • Loading branch information
nicknisi authored Mar 10, 2020
1 parent 5491eff commit 47d1b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jq.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ dojo.query differences that cause some tests to fail:
// inherited from Object.prototype. For example, if obj has a custom
// toString() method, don't overwrite it with the toString() method
// that props inherited from Object.prototype
if((tobj[x] === undefined || tobj[x] != props[x]) && props[x] !== undefined && obj != props[x]){
if(x !== '__proto__ ' && ((tobj[x] === undefined || tobj[x] != props[x])) && props[x] !== undefined && obj != props[x]){
if(dojo.isObject(obj[x]) && dojo.isObject(props[x])){
if(dojo.isArray(props[x])){
obj[x] = props[x];
Expand Down

0 comments on commit 47d1b30

Please sign in to comment.