Skip to content

Commit 47d1b30

Browse files
authored
Merge pull request from GHSA-3hw5-q855-g6cw
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
1 parent 5491eff commit 47d1b30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: jq.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ dojo.query differences that cause some tests to fail:
455455
// inherited from Object.prototype. For example, if obj has a custom
456456
// toString() method, don't overwrite it with the toString() method
457457
// that props inherited from Object.prototype
458-
if((tobj[x] === undefined || tobj[x] != props[x]) && props[x] !== undefined && obj != props[x]){
458+
if(x !== '__proto__ ' && ((tobj[x] === undefined || tobj[x] != props[x])) && props[x] !== undefined && obj != props[x]){
459459
if(dojo.isObject(obj[x]) && dojo.isObject(props[x])){
460460
if(dojo.isArray(props[x])){
461461
obj[x] = props[x];

0 commit comments

Comments
 (0)