Commit 68662fc
* Fix allowAttributes().globally() (#247)
Add guard to .globally() method of HtmlPolicyBuilder to prevent
ArrayOutOfBoundsException when checking to see if the zeroth
element of the attributeNames list contains 'style'.
This restores behaviour present in version 202180219.1 which
allowed for an empty allowed attributes names list to be
specified globally through the builder.
* Allow styling when any attribute name matches "style" globally
---------
Co-authored-by: Mike Samuel <[email protected]>
1 parent 0166eb4 commit 68662fc
File tree
2 files changed
+10
-5
lines changed- src
- main/java/org/owasp/html
- test/java/org/owasp/html
2 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
| 967 | + | |
| 968 | + | |
972 | 969 | | |
| 970 | + | |
| 971 | + | |
973 | 972 | | |
974 | 973 | | |
975 | 974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
1010 | 1016 | | |
1011 | 1017 | | |
1012 | 1018 | | |
| |||
0 commit comments