@@ -339,14 +339,13 @@ private module OrmTracking {
339
339
340
340
override predicate isSource ( DataFlow2:: Node source ) { source instanceof OrmInstantiation }
341
341
342
- // Select any call node and narrow down later
343
- override predicate isSink ( DataFlow2:: Node sink ) { sink instanceof DataFlow2:: CallNode }
342
+ // Select any call receiver and narrow down later
343
+ override predicate isSink ( DataFlow2:: Node sink ) {
344
+ sink = any ( DataFlow2:: CallNode c ) .getReceiver ( )
345
+ }
344
346
345
347
override predicate isAdditionalFlowStep ( DataFlow2:: Node node1 , DataFlow2:: Node node2 ) {
346
348
Shared:: isAdditionalXssFlowStep ( node1 , node2 )
347
- or
348
- // Propagate flow through arbitrary method calls
349
- node2 .( DataFlow2:: CallNode ) .getReceiver ( ) = node1
350
349
}
351
350
}
352
351
}
@@ -379,10 +378,9 @@ module StoredXss {
379
378
380
379
private class OrmFieldAsSource extends Source instanceof DataFlow2:: CallNode {
381
380
OrmFieldAsSource ( ) {
382
- exists ( OrmTracking:: Configuration subConfig , DataFlow2:: CallNode subSrc , MethodCall call |
383
- subConfig .hasFlow ( subSrc , this ) and
384
- call = this .asExpr ( ) .getExpr ( ) and
385
- subSrc .( OrmInstantiation ) .methodCallMayAccessField ( call .getMethodName ( ) )
381
+ exists ( OrmTracking:: Configuration subConfig , DataFlow2:: CallNode subSrc |
382
+ subConfig .hasFlow ( subSrc , this .getReceiver ( ) ) and
383
+ subSrc .( OrmInstantiation ) .methodCallMayAccessField ( this .getMethodName ( ) )
386
384
)
387
385
}
388
386
}
0 commit comments