@@ -27,21 +27,18 @@ class XPathInjectionConfiguration extends TaintTracking::Configuration {
2727class XPathInjectionSink extends DataFlow:: ExprNode {
2828 XPathInjectionSink ( ) {
2929 exists ( Method m , MethodAccess ma | ma .getMethod ( ) = m |
30- (
31- m .getDeclaringType ( ) .hasQualifiedName ( "javax.xml.xpath" , "XPath" ) and
32- ( m .hasName ( "evaluate" ) or m .hasName ( "compile" ) ) and
33- ma .getArgument ( 0 ) = this .getExpr ( )
34- ) or
35- (
36- m .getDeclaringType ( ) .hasQualifiedName ( "org.dom4j" , "Node" ) and
37- ( m .hasName ( "selectNodes" ) or m .hasName ( "selectSingleNode" ) ) and
38- ma .getArgument ( 0 ) = this .getExpr ( )
39- )
30+ m .getDeclaringType ( ) .hasQualifiedName ( "javax.xml.xpath" , "XPath" ) and
31+ ( m .hasName ( "evaluate" ) or m .hasName ( "compile" ) ) and
32+ ma .getArgument ( 0 ) = this .getExpr ( )
33+ or
34+ m .getDeclaringType ( ) .hasQualifiedName ( "org.dom4j" , "Node" ) and
35+ ( m .hasName ( "selectNodes" ) or m .hasName ( "selectSingleNode" ) ) and
36+ ma .getArgument ( 0 ) = this .getExpr ( )
4037 )
4138 }
4239}
4340
4441from DataFlow:: PathNode source , DataFlow:: PathNode sink , XPathInjectionConfiguration c
4542where c .hasFlowPath ( source , sink )
4643select sink .getNode ( ) , source , sink , "$@ flows to here and is used in an XPath expression." ,
47- source .getNode ( ) , "User-provided value"
44+ source .getNode ( ) , "User-provided value"
0 commit comments