-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent non http/https links from being unescaped
Our permissive HTML escaping is preserving some HTML tags, which includes basic link tags (a tag with href and optional target attributes). Previous versions were not inspecting the value of href, which made it possible to add links with e.g. a "javascript:" protocol. This opened some XSS attack vectors. After this change it is only possible to link to http and https protocols. All other links will not be unescaped. Change-Id: If639df20428e46d5bdc7ef14dec659babd89f86d
- Loading branch information
1 parent
fdc83fe
commit 87ceb96
Showing
2 changed files
with
14 additions
and
2 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