gabrielecirulli / hn-special

A modern theme for Hacker News, with some added niceties.
MIT License
333 stars 71 forks source link

Fix usage of innerHTML #88

Open PxlBuzzard opened 8 years ago

PxlBuzzard commented 8 years ago

After a full review by the Mozilla Addon team, they have 1 issue to report:

This add-on is creating DOM nodes from HTML strings containing potentially unsanitized data, by assigning to innerHTML, jQuery.html, or through similar means. Aside from being inefficient, this is a major security risk. For more information, see https://developer.mozilla.org/en/XUL_School/DOM_Building_and_HTML_Insertion. Here are some examples that were discovered:

https://github.com/gabrielecirulli/hn-special/blob/master/lib/modules/user_tooltips.js#L43