Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b226f76

Browse files
committed
JS: Fix tracking of fastify server instance
1 parent 0ca9feb commit b226f76

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • javascript/ql/lib/semmle/javascript/frameworks

javascript/ql/lib/semmle/javascript/frameworks/Fastify.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ module Fastify {
132132
string methodName;
133133

134134
RouteSetup() {
135-
this.getMethodName() = methodName and
136-
methodName = ["route", "get", "head", "post", "put", "delete", "options", "patch"] and
137-
server.flowsTo(this.getReceiver())
135+
this = server(server.flow()).getAMethodCall(methodName).asExpr() and
136+
methodName = ["route", "get", "head", "post", "put", "delete", "options", "patch"]
138137
}
139138

140139
override DataFlow::SourceNode getARouteHandler() {

0 commit comments

Comments
 (0)