Skip to content

Commit 926fedb

Browse files
Update java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.java
Co-authored-by: Marcono1234 <[email protected]>
1 parent 00a7576 commit 926fedb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void handle(HttpServletRequest request) throws Exception {
133133

134134
new DefaultXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
135135
new XPathPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
136-
new XPathPattern(new PatternStub(user)); // Safe
136+
new XPathPattern(new PatternStub(user)); // Jaxen is not modeled yet
137137

138138
DocumentFactory docFactory = DocumentFactory.getInstance();
139139
docFactory.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
@@ -155,4 +155,4 @@ public void handle(HttpServletRequest request) throws Exception {
155155
namespace.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
156156
namespace.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection
157157
}
158-
}
158+
}

0 commit comments

Comments
 (0)