@@ -99,7 +99,7 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod
99
99
100
100
/** A concatenate expression using `(` and `)` or `);`. */
101
101
class JsonpBuilderExpr extends AddExpr {
102
- JsonpInjectionExpr ( ) {
102
+ JsonpBuilderExpr ( ) {
103
103
getRightOperand ( ) .toString ( ) .regexpMatch ( "\"\\);?\"" ) and
104
104
getLeftOperand ( )
105
105
.( AddExpr )
@@ -126,7 +126,7 @@ class RemoteFlowConfig extends DataFlow2::Configuration {
126
126
override predicate isSource ( DataFlow:: Node src ) { src instanceof RemoteFlowSource }
127
127
128
128
override predicate isSink ( DataFlow:: Node sink ) {
129
- exists ( JsonpInjectionExpr jhe | jhe .getFunctionName ( ) = sink .asExpr ( ) )
129
+ exists ( JsonpBuilderExpr jhe | jhe .getFunctionName ( ) = sink .asExpr ( ) )
130
130
}
131
131
}
132
132
@@ -137,7 +137,7 @@ class JsonDataFlowConfig extends DataFlow2::Configuration {
137
137
override predicate isSource ( DataFlow:: Node src ) { src instanceof JsonpStringSource }
138
138
139
139
override predicate isSink ( DataFlow:: Node sink ) {
140
- exists ( JsonpInjectionExpr jhe | jhe .getJsonExpr ( ) = sink .asExpr ( ) )
140
+ exists ( JsonpBuilderExpr jhe | jhe .getJsonExpr ( ) = sink .asExpr ( ) )
141
141
}
142
142
}
143
143
@@ -146,7 +146,7 @@ class JsonpInjectionFlowConfig extends TaintTracking::Configuration {
146
146
JsonpInjectionFlowConfig ( ) { this = "JsonpInjectionFlowConfig" }
147
147
148
148
override predicate isSource ( DataFlow:: Node src ) {
149
- exists ( JsonpInjectionExpr jhe , JsonDataFlowConfig jdfc , RemoteFlowConfig rfc |
149
+ exists ( JsonpBuilderExpr jhe , JsonDataFlowConfig jdfc , RemoteFlowConfig rfc |
150
150
jhe = src .asExpr ( ) and
151
151
jdfc .hasFlowTo ( DataFlow:: exprNode ( jhe .getJsonExpr ( ) ) ) and
152
152
rfc .hasFlowTo ( DataFlow:: exprNode ( jhe .getFunctionName ( ) ) )
0 commit comments