@@ -517,9 +517,10 @@ module Express {
517
517
/**
518
518
* Holds if `call` is a chainable method call on the response object of `handler`.
519
519
*/
520
- private predicate isChainableResponseMethodCall ( RouteHandler handler , MethodCallExpr call ) {
521
- // TODO: DataFlow::MethodCallNode
522
- exists ( string name | call .calls ( handler .getAResponseNode ( ) .asExpr ( ) , name ) |
520
+ private predicate isChainableResponseMethodCall (
521
+ RouteHandler handler , DataFlow:: MethodCallNode call
522
+ ) {
523
+ exists ( string name | call .calls ( handler .getAResponseNode ( ) , name ) |
523
524
name =
524
525
[
525
526
"append" , "attachment" , "location" , "send" , "sendStatus" , "set" , "status" , "type" , "vary" ,
@@ -541,7 +542,7 @@ module Express {
541
542
ExplicitResponseSource ( ) {
542
543
this = rh .getResponseParameter ( )
543
544
or
544
- isChainableResponseMethodCall ( rh , this . asExpr ( ) )
545
+ isChainableResponseMethodCall ( rh , this )
545
546
}
546
547
547
548
/**
@@ -766,23 +767,22 @@ module Express {
766
767
/**
767
768
* Holds if `e` is an HTTP request object.
768
769
*/
769
- predicate isRequest ( Expr e ) { any ( RouteHandler rh ) .getARequestNode ( ) . asExpr ( ) = e } // TODO: DataFlow::Node
770
+ predicate isRequest ( DataFlow :: Node e ) { any ( RouteHandler rh ) .getARequestNode ( ) = e }
770
771
771
772
/**
772
773
* Holds if `e` is an HTTP response object.
773
774
*/
774
- predicate isResponse ( Expr e ) { any ( RouteHandler rh ) .getAResponseNode ( ) . asExpr ( ) = e } // TODO: DataFlow::Node
775
+ predicate isResponse ( DataFlow :: Node e ) { any ( RouteHandler rh ) .getAResponseNode ( ) = e }
775
776
776
777
/**
777
778
* An access to the HTTP request body.
778
779
*/
779
- class RequestBodyAccess extends Expr {
780
- // TODO: DataFlow::Node
781
- RequestBodyAccess ( ) { any ( RouteHandler h ) .getARequestBodyAccess ( ) .asExpr ( ) = this }
780
+ class RequestBodyAccess extends DataFlow:: Node {
781
+ RequestBodyAccess ( ) { any ( RouteHandler h ) .getARequestBodyAccess ( ) = this }
782
782
}
783
783
784
784
abstract private class HeaderDefinition extends HTTP:: Servers:: StandardHeaderDefinition {
785
- HeaderDefinition ( ) { isResponse ( this .getReceiver ( ) . asExpr ( ) ) }
785
+ HeaderDefinition ( ) { isResponse ( this .getReceiver ( ) ) }
786
786
787
787
override RouteHandler getRouteHandler ( ) { this .getReceiver ( ) = result .getAResponseNode ( ) }
788
788
}
0 commit comments