mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user