Skip to content

Release version 1.6.6

Compare
Choose a tag to compare
@davewichers davewichers released this 02 Apr 20:16
· 454 commits to main since this release

This release addresses the following issues:

  1. This release fixes 2 security issues reported by researcher Hyeong Gwan, Yi

CVE-2022-28367: AntiSamy before 1.6.6 allows XSS via HTML tag smuggling on STYLE content. https://www.cvedetails.com/cve/CVE-2022-28367. NOTE: This release only included a PARTIAL fix. It's completely fixed in the 1.6.7 release.

AntiSamy prior to 1.6.6 used the old CyberNeko HTML library v1.9.22, which is subject to https://www.cvedetails.com/cve/CVE-2022-28366 and no longer maintained. AntiSamy 1.6.6 upgraded to an active fork of CyberNeko called HtmlUnit-Neko which fixed this CVE in v2.27 of that library. AntiSamy 1.6.6 upgraded to version 2.60.0 of HtmlUnit-Neko.

  1. Enhancement #147: Add require-closing-tags to default AntiSamy policy file

  2. Bug #151: Change in behavior between 1.6.4 and 1.6.5 for getErrorMessages

We accidentally stopped propagating an errorMessages parameter in 1 API. This is now fixed.

NOTIFICATION 1: This 1.6.6 release has 2 dependencies which require Java 8, although the AntiSamy source code itself still only requires Java 7.

NOTIFICATION 2: The 1.7.0 release will drop support for several things deprecated in the 1.6.x series of releases.

a) AntiSamy 1.6.0 introduced XML schema validation for AntiSamy policy files to address issue #58. In all the 1.6.X releases, enforcement of schema validation is optional, with warnings generated to indicate it should be enforced. Starting with AntiSamy 1.7.0 this will no longer be optional.

To support this new feature, but keep it optional, 2 new Policy class methods were created, and immediately deprecated:

public static boolean getSchemaValidation()
public static void setSchemaValidation(boolean enable)

These two methods will be dropped in the 1.7.0 release, and any AntiSamy policy files that fail schema validation will result in an error and have to be fixed.

b) AntiSamy 1.6.5 changed some APIs. Specifically:

These constructors are now @deprecated:

public CssHandler(Policy policy, LinkedList embeddedStyleSheets, List errorMessages, ResourceBundle messages)
public CssHandler(Policy policy, LinkedList embeddedStyleSheets, List errorMessages, String tagName, ResourceBundle messages)

And are being replaced with:

public CssHandler(Policy policy, List errorMessages, ResourceBundle messages)
public CssHandler(Policy policy, List errorMessages, ResourceBundle messages, String tagName) <-- Notice that the tagName is now the last parameter in the new API.

Both constructors drop the 2nd parameter (the queue of stylesheets imported), as that queue is now created inside this constructor. A reference to this queue (if needed) can be retrieved by using the new method:

public LinkedList getImportedStylesheetsURIList()

c) This 1.6.6 release deprecates support for Xhtml. As such, the following are deprecated:

The constant: Policy.USE_XHTML = "useXHTML";
The method: InternalPolicy.isXhtml()
The entire class: org/owasp/validator/html/scan/ASXHTMLSerializer.java

We plan to remove everything deprecated in the 1.7.0 release.