Skip to content

Release version 1.6.6.1

Compare
Choose a tag to compare
@davewichers davewichers released this 07 Apr 23:37
· 539 commits to main since this release

The 1.6.6.1 release corrects a minor issue in the 1.6.6 release:

We accidentally upgraded the byte code generated for antisamy.jar to be Java 8, when it can still be Java 7. So this release generates a Java 7 jar file instead. This allows Java 7 projects to use AntiSamy 1.6.6.1 by doing the following:

Exclude the 2 Java 8 dependencies we currently use:

  • commons-o:commons-io:2.11.0
  • net.sourceforge.htmlunit:neko-htmlunit:2.60.0

You then import and use the last Java 7 versions of these libraries:

  • commons-io:commons-io:2.6
  • net.sourceforge.htmlunit:neko-htmlunit:2.24

A few plugins were upgraded and some were added but none of the dependencies were changed.


The previous 1.6.6 release addressed the following issues:

  1. This release fixes 3 security issues reported by researcher Hyeongkwan Lee

CVEs for these have not been created yet, so we are not providing any details on the issues at this time.

  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.