Skip to content

Commit

Permalink
Fix EventTarget prototype abuse vulnerability (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
weizman authored Jun 27, 2023
1 parent d648e27 commit 81ac843
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions snow.js
Original file line number Diff line number Diff line change
Expand Up @@ -959,10 +959,10 @@ function setup(win) {
return bag.setAttribute.call(element, attribute, value);
}
function addEventListener(element, event, listener, options) {
return bag.addEventListener.call(element, event, listener, options);
return bag.Function.prototype.call.call(bag.addEventListener, element, event, listener, options);
}
function removeEventListener(element, event, listener, options) {
return bag.removeEventListener.call(element, event, listener, options);
return bag.Function.prototype.call.call(bag.removeEventListener, element, event, listener, options);
}
function createElement(document, tagName, options) {
return bag.createElement.call(document, tagName, options);
Expand Down
Loading

0 comments on commit 81ac843

Please sign in to comment.