File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,10 @@ module Express {
7676 * Holds if `call` decorates the function `pred`.
7777 * This means that `call` returns a function that forwards its arguments to `pred`.
7878 */
79- predicate decoratedRouteHandler ( DataFlow:: SourceNode pred , DataFlow:: CallNode call ) {
79+ predicate isDecoratedCall ( DataFlow:: CallNode call , DataFlow:: FunctionNode decoratee ) {
8080 // indirect route-handler `result` is given to function `outer`, which returns function `inner` which calls the function `pred`.
8181 exists ( int i , Function outer , Function inner |
82- pred = call .getArgument ( i ) .getALocalSource ( ) and
82+ decoratee = call .getArgument ( i ) .getALocalSource ( ) and
8383 outer = call .getACallee ( ) and
8484 inner = outer .getAReturnedExpr ( ) and
8585 forwardingCall ( DataFlow:: parameterNode ( outer .getParameter ( i ) ) , inner .flow ( ) )
@@ -103,7 +103,7 @@ module Express {
103103 * Holds if there exists a step from `pred` to `succ` for a RouteHandler - beyond the usual steps defined by TypeTracking.
104104 */
105105 predicate routeHandlerStep ( DataFlow:: SourceNode pred , DataFlow:: SourceNode succ ) {
106- decoratedRouteHandler ( pred , succ )
106+ isDecoratedCall ( succ , pred )
107107 or
108108 // A forwarding call
109109 forwardingCall ( pred , succ )
Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ module HTTP {
596596 DataFlow:: SourceNode getAPossiblyDecoratedHandler ( RouteHandlerCandidate candidate ) {
597597 result = candidate
598598 or
599- Express:: decoratedRouteHandler ( candidate , result )
599+ Express:: isDecoratedCall ( result , candidate )
600600 }
601601
602602 /**
You can’t perform that action at this time.
0 commit comments