Skip to content
Browse files
Fixed: Fix linting issues
  • Loading branch information
mthl committed Nov 8, 2019
1 parent 3d3533c commit 03b69b30a510bb92dfb01a478de3a2ad1083ec70
@@ -309,7 +309,7 @@ checkstyle {
// the sum of errors that were present before introducing the
// ‘checkstyle’ tool present in the framework and in the official
// plugins.
tasks.checkstyleMain.maxErrors = 37780
tasks.checkstyleMain.maxErrors = 37776
// Currently there are a lot of errors so we need to temporarily
// hide them to avoid polluting the terminal output.
showViolations = false
@@ -99,7 +99,8 @@ private static void checkStringForHtmlStrictNoneTest(String label, String fixed,
public void testCheckStringForHtmlSafe() {
String xssVector = "<script>alert('XSS vector');</script>";
List<String> errorList = new ArrayList<>();
String canonicalizedXssVector = UtilCodec.checkStringForHtmlSafe("fieldName", xssVector, errorList,new Locale("test"), true);
String canonicalizedXssVector = UtilCodec.checkStringForHtmlSafe("fieldName", xssVector, errorList,
new Locale("test"), true);
assertEquals("<script>alert('XSS vector');</script>", canonicalizedXssVector);
assertEquals(1, errorList.size());
assertEquals("In field [fieldName] by our input policy, your input has not been accepted for security reason. "
@@ -614,8 +614,8 @@ public void validate(Map<String, Object> context, String mode, Locale locale) th
if ("none".equals(modelParam.allowHtml)) {
UtilCodec.checkStringForHtmlStrictNone(, value, errorMessageList, (Locale) context.get("locale"));
} else if ("safe".equals(modelParam.allowHtml)) {
UtilCodec.checkStringForHtmlSafe(, value, errorMessageList,
(Locale) context.get("locale"),
UtilCodec.checkStringForHtmlSafe(, value, errorMessageList,
(Locale) context.get("locale"),
EntityUtilProperties.getPropertyAsBoolean("owasp", "sanitizer.enable", true));

0 comments on commit 03b69b3

Please sign in to comment.