Skip to content

Commit

Permalink
Fix XSS via prototype pollution (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliofarah authored Apr 27, 2021
1 parent d580a04 commit 43221c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function parse(html, doc) {
}

// wrap map
var wrap = map[tag] || map._default;
var wrap = Object.prototype.hasOwnProperty.call(map, tag) ? map[tag] : map._default;
var depth = wrap[0];
var prefix = wrap[1];
var suffix = wrap[2];
Expand Down

0 comments on commit 43221c5

Please sign in to comment.