Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix some XSS issues
Since OSM data, changeset comments and potentially even OSM usernames may contain HTML code, it's better to use the textContent property to insert such values, since innerHTML would result in interpretation of this HTML code which might even result in the execution of JavaScript code [1]. The Underscore.js template is also affected by such issues, which can be mitigated by using <%- instead of <%= for interpolations [2]. [1] https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#Security_considerations [2] http://underscorejs.org/#template
- Loading branch information
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters