File tree Expand file tree Collapse file tree
src/semmle/code/java/security
test/experimental/query-tests/security/CWE-643 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import semmle.code.java.dataflow.FlowSources
22import semmle.code.java.dataflow.TaintTracking
3- import semmle.code.java.security.XmlParsers
43
54/**
65 * An abstract type representing a call to interpret XPath expressions.
@@ -18,9 +17,7 @@ class XPath extends RefType {
1817class XPathEvaluateOrCompile extends XPathSink {
1918 XPathEvaluateOrCompile ( ) {
2019 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" ] )
2421 )
2522 }
2623
@@ -36,7 +33,7 @@ class Dom4JNode extends RefType {
3633class NodeSelectNodes extends XPathSink {
3734 NodeSelectNodes ( ) {
3835 exists ( Method m | this .getMethod ( ) = m and m .getDeclaringType ( ) instanceof Dom4JNode |
39- m .hasName ( "selectNodes" ) or m . hasName ( "selectSingleNode" )
36+ m .hasName ( [ "selectNodes" , "selectSingleNode" ] )
4037 )
4138 }
4239
Original file line number Diff line number Diff line change 1- import javax .xml .*;
2-
31import org .w3c .dom .Document ;
42import org .xml .sax .InputSource ;
53import org .xml .sax .SAXException ;
You can’t perform that action at this time.
0 commit comments