-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'flavorjones-remediate-attribute-escaping'
- Loading branch information
Showing
4 changed files
with
124 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# coding: utf-8 | ||
require 'set' | ||
|
||
module Loofah | ||
# | ||
# constants related to working around unhelpful libxml2 behavior | ||
# | ||
# ಠ_ಠ | ||
# | ||
module LibxmlWorkarounds | ||
# | ||
# these attributes and qualifying parent tags are determined by the code at: | ||
# | ||
# https://git.gnome.org/browse/libxml2/tree/HTMLtree.c?h=v2.9.2#n714 | ||
# | ||
# see comments about CVE-2018-8048 within the tests for more information | ||
# | ||
BROKEN_ESCAPING_ATTRIBUTES = Set.new %w[ | ||
href | ||
action | ||
src | ||
name | ||
] | ||
BROKEN_ESCAPING_ATTRIBUTES_QUALIFYING_TAG = {"name" => "a"} | ||
end | ||
end |
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