diff --git a/java/ql/test/library-tests/frameworks/spring/webutil/Test.java b/java/ql/test/library-tests/frameworks/spring/webutil/Test.java index e28569170413..e37426ea4a62 100644 --- a/java/ql/test/library-tests/frameworks/spring/webutil/Test.java +++ b/java/ql/test/library-tests/frameworks/spring/webutil/Test.java @@ -2579,6 +2579,48 @@ public void test() throws Exception { out = WebUtils.parseMatrixVariables(in); sink(getMapValue(out)); // $hasTaintFlow } + { + // "org.springframework.web.util;HtmlUtils;false;htmlEscape;;;Argument[0];ReturnValue;taint" + String out = null; + String in = (String)source(); + out = HtmlUtils.htmlEscape(in, null); + sink(out); // $ hasTaintFlow + } + { + // "org.springframework.web.util;HtmlUtils;false;htmlEscape;;;Argument[0];ReturnValue;taint" + String out = null; + String in = (String)source(); + out = HtmlUtils.htmlEscape(in); + sink(out); // $ hasTaintFlow + } + { + // "org.springframework.web.util;HtmlUtils;false;htmlEscapeDecimal;;;Argument[0];ReturnValue;taint" + String out = null; + String in = (String)source(); + out = HtmlUtils.htmlEscapeDecimal(in, null); + sink(out); // $ hasTaintFlow + } + { + // "org.springframework.web.util;HtmlUtils;false;htmlEscapeDecimal;;;Argument[0];ReturnValue;taint" + String out = null; + String in = (String)source(); + out = HtmlUtils.htmlEscapeDecimal(in); + sink(out); // $ hasTaintFlow + } + { + // "org.springframework.web.util;HtmlUtils;false;htmlEscapeHex;;;Argument[0];ReturnValue;taint" + String out = null; + String in = (String)source(); + out = HtmlUtils.htmlEscapeHex(in, null); + sink(out); // $ hasTaintFlow + } + { + // "org.springframework.web.util;HtmlUtils;false;htmlEscapeHex;;;Argument[0];ReturnValue;taint" + String out = null; + String in = (String)source(); + out = HtmlUtils.htmlEscapeHex(in); + sink(out); // $ hasTaintFlow + } }