File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
src/semmle/code/java/security
test/experimental/query-tests/security/CWE-643 Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 1
1
import semmle.code.java.dataflow.FlowSources
2
2
import semmle.code.java.dataflow.TaintTracking
3
- import semmle.code.java.security.XmlParsers
4
3
5
4
/**
6
5
* An abstract type representing a call to interpret XPath expressions.
@@ -18,9 +17,7 @@ class XPath extends RefType {
18
17
class XPathEvaluateOrCompile extends XPathSink {
19
18
XPathEvaluateOrCompile ( ) {
20
19
exists ( Method m | this .getMethod ( ) = m and m .getDeclaringType ( ) instanceof XPath |
21
- m .hasName ( "evaluate" )
22
- or
23
- m .hasName ( "compile" )
20
+ m .hasName ( [ "evaluate" , "compile" ] )
24
21
)
25
22
}
26
23
@@ -36,7 +33,7 @@ class Dom4JNode extends RefType {
36
33
class NodeSelectNodes extends XPathSink {
37
34
NodeSelectNodes ( ) {
38
35
exists ( Method m | this .getMethod ( ) = m and m .getDeclaringType ( ) instanceof Dom4JNode |
39
- m .hasName ( "selectNodes" ) or m . hasName ( "selectSingleNode" )
36
+ m .hasName ( [ "selectNodes" , "selectSingleNode" ] )
40
37
)
41
38
}
42
39
Original file line number Diff line number Diff line change 1
- import javax .xml .*;
2
-
3
1
import org .w3c .dom .Document ;
4
2
import org .xml .sax .InputSource ;
5
3
import org .xml .sax .SAXException ;
You can’t perform that action at this time.
0 commit comments