Update java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.java

Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
This commit is contained in:
Tony Torralba
2021-05-03 09:10:45 +02:00
parent 00a7576679
commit 926fedb7fb

View File

@@ -133,7 +133,7 @@ public class XPathInjectionTest {
new DefaultXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
new XPathPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
new XPathPattern(new PatternStub(user)); // Safe
new XPathPattern(new PatternStub(user)); // Jaxen is not modeled yet
DocumentFactory docFactory = DocumentFactory.getInstance();
docFactory.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
@@ -155,4 +155,4 @@ public class XPathInjectionTest {
namespace.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
namespace.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
}
}
}