From 8dc34aaf520aa9649fec3266477c96b1cb344725 Mon Sep 17 00:00:00 2001 From: davewichers Date: Mon, 9 Mar 2020 16:04:13 -0400 Subject: [PATCH] Add line in AntiSamySAXScanner.java that was accidentally deleted during prep for 1.5.8 release to address issue #39. Upgrade a few components in pom that have been released since 1.5.8 release. This should be the 1.5.9 release. --- pom.xml | 23 +++++++++---------- .../html/scan/AntiSamySAXScanner.java | 10 ++++---- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 24124847..2eb64a36 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.owasp.antisamy antisamy jar - 1.5.8 + 1.5.9 @@ -39,8 +39,7 @@ scm:git:git@github.com:nahsra/antisamy.git scm:git:git@github.com:nahsra/antisamy.git scm:git:git@github.com:nahsra/antisamy.git - antisamy-1.5.8 - + UTF-8 @@ -55,9 +54,9 @@ org.apache.xmlgraphics batik-css - 1.11 + 1.12 - + commons-logging commons-logging @@ -79,9 +78,9 @@ org.apache.httpcomponents httpclient - 4.5.8 + 4.5.12 - + commons-codec commons-codec @@ -96,14 +95,14 @@ commons-codec commons-codec - 1.12 + 1.14 junit junit - 4.12 + 4.13 test @@ -194,14 +193,14 @@ com.github.spotbugs spotbugs-maven-plugin - 3.1.11 + 3.1.12.2 - + diff --git a/src/main/java/org/owasp/validator/html/scan/AntiSamySAXScanner.java b/src/main/java/org/owasp/validator/html/scan/AntiSamySAXScanner.java index eed05ffa..01b41600 100644 --- a/src/main/java/org/owasp/validator/html/scan/AntiSamySAXScanner.java +++ b/src/main/java/org/owasp/validator/html/scan/AntiSamySAXScanner.java @@ -159,12 +159,12 @@ public CleanResults scan(Reader reader, Writer writer) throws ScanException { transformer.transform(source, new SAXResult(serializer)); errorMessages.clear(); errorMessages.addAll(cachedItem.magicSAXFilter.getErrorMessages()); + cachedItems.add( cachedItem); + return new CleanResults(startOfScan, (String)null, (DocumentFragment)null, errorMessages); - return new CleanResults(startOfScan, (String)null, (DocumentFragment)null, errorMessages); - - } catch (Exception e) { - throw new ScanException(e); - } + } catch (Exception e) { + throw new ScanException(e); + } } /**