diff --git a/README.md b/README.md
index b60b9f8..b446808 100644
--- a/README.md
+++ b/README.md
@@ -174,6 +174,13 @@ Some sample screenshots with different configurations are included below :
Changelog
---------
+0.56:
+
+ - prevent a form a stored XSS in the stored audit values. Addresses GitHub issue #7.
+ - replaced the use of the YUI compressor ant task by a call to the jar directly as the ant task seems to be incompatible with current underlying dependencies
+ - fixed a small unrelated typo
+ - no new features
+
0.55:
- switched back to using the previous, alfresco-provided, JSON parsing utility rather than JSON.parse, which is not available in all supported versions for this dashlet (issue #5).
diff --git a/build.properties b/build.properties
index d3f9158..59ee613 100644
--- a/build.properties
+++ b/build.properties
@@ -1,3 +1,3 @@
-build.version=0.55
+build.version=0.56
project.name=audit-dashlet
jar.name=${project.name}-${build.version}.jar
diff --git a/build.xml b/build.xml
index 9a14da0..0f6a4a2 100644
--- a/build.xml
+++ b/build.xml
@@ -69,6 +69,7 @@
+
@@ -86,7 +87,7 @@
-
+
@@ -173,10 +174,19 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -446,4 +456,4 @@
-->
-
\ No newline at end of file
+
diff --git a/config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application-data.get.js b/config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application-data.get.js
index 4f41fba..799ad15 100644
--- a/config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application-data.get.js
+++ b/config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application-data.get.js
@@ -81,7 +81,11 @@ function main()
var escaped_response = json_requoted_response.replace(/(\n|\r\n|\r)/g, " ");
//if (logger.isLoggingEnabled()) logger.log("escaped_response:\n"+escaped_response);
- var auditresponse = jsonUtils.toObject(escaped_response);
+ // prevents some form of stored XSS by preventing HTML tags from being interpreted as part of the stored audit values. addresses GitHub issue #7.
+ var xss_replacements_response = escaped_response.replace(//g, ">");
+ //if (logger.isLoggingEnabled()) logger.log("xss_replacements_response:\n"+xss_replacements_response);
+
+ var auditresponse = jsonUtils.toObject(xss_replacements_response);
model.auditresponse = auditresponse;
model.jsonResp = result.response;
}
diff --git a/lib/yuicompressor-2.4.7.jar b/lib/yuicompressor-2.4.7.jar
deleted file mode 100644
index 3c9a408..0000000
Binary files a/lib/yuicompressor-2.4.7.jar and /dev/null differ
diff --git a/lib/yuicompressor-2.4.8-alfresco-patched.jar b/lib/yuicompressor-2.4.8-alfresco-patched.jar
new file mode 100644
index 0000000..9704f7e
Binary files /dev/null and b/lib/yuicompressor-2.4.8-alfresco-patched.jar differ
diff --git a/source/web/extras/components/dashlets/audit-application.js b/source/web/extras/components/dashlets/audit-application.js
index e1fa3cc..6fa6a07 100644
--- a/source/web/extras/components/dashlets/audit-application.js
+++ b/source/web/extras/components/dashlets/audit-application.js
@@ -926,7 +926,7 @@ if (typeof Extras.dashlet == "undefined" || !Extras.dashlet)
}
- // all this additional highlighting work is unncessary if we're looking for negated matches,
+ // all this additional highlighting work is unnecessary if we're looking for negated matches,
// as there will be no highlighting for those
if (!negation_predicate_present)
{