Skip to content

Commit 104eafe

Browse files
author
Esben Sparre Andreasen
committed
JS: cleanup for all HTTP::RouteHandlerCandidates
1 parent 88c69e2 commit 104eafe

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

javascript/ql/src/semmle/javascript/frameworks/ConnectExpressShared.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ module ConnectExpressShared {
3232
*
3333
* For example, this could be the function `function(req, res, next){...}`.
3434
*/
35-
class RouteHandlerCandidate extends HTTP::RouteHandlerCandidate, DataFlow::FunctionNode {
36-
37-
override Function astNode;
35+
class RouteHandlerCandidate extends HTTP::RouteHandlerCandidate {
3836

3937
RouteHandlerCandidate() {
4038
exists (string request, string response, string next, string error |

javascript/ql/src/semmle/javascript/frameworks/Hapi.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ module Hapi {
228228
*
229229
* For example, this could be the function `function(request, h){...}`.
230230
*/
231-
class RouteHandlerCandidate extends HTTP::RouteHandlerCandidate, DataFlow::FunctionNode {
232-
233-
override Function astNode;
231+
class RouteHandlerCandidate extends HTTP::RouteHandlerCandidate {
234232

235233
RouteHandlerCandidate() {
236234
exists (string request, string responseToolkit |

javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,7 @@ module NodeJSLib {
597597
*
598598
* For example, this could be the function `function(req, res){...}`.
599599
*/
600-
class RouteHandlerCandidate extends HTTP::RouteHandlerCandidate, DataFlow::FunctionNode {
601-
602-
override Function astNode;
600+
class RouteHandlerCandidate extends HTTP::RouteHandlerCandidate {
603601

604602
RouteHandlerCandidate() {
605603
exists (string request, string response |

javascript/ql/src/semmle/javascript/heuristics/AdditionalRouteHandlers.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import javascript
88
private import semmle.javascript.frameworks.ConnectExpressShared
99

1010
/**
11-
* Adds `NodeJSLib::RouteHandlerCandidate` to the extent of `NodeJSLib::RouteHandler`.
11+
* Add `NodeJSLib::RouteHandlerCandidate` to the extent of `NodeJSLib::RouteHandler`.
1212
*/
1313
private class PromotedNodeJSLibCandidate extends NodeJSLib::RouteHandler, HTTP::Servers::StandardRouteHandler {
1414

@@ -19,7 +19,7 @@ private class PromotedNodeJSLibCandidate extends NodeJSLib::RouteHandler, HTTP::
1919
}
2020

2121
/**
22-
* Adds `Hapi::RouteHandlerCandidate` to the extent of `Hapi::RouteHandler`.
22+
* Add `Hapi::RouteHandlerCandidate` to the extent of `Hapi::RouteHandler`.
2323
*/
2424
private class PromotedHapiCandidate extends Hapi::RouteHandler, HTTP::Servers::StandardRouteHandler {
2525

@@ -30,7 +30,7 @@ private class PromotedHapiCandidate extends Hapi::RouteHandler, HTTP::Servers::S
3030
}
3131

3232
/**
33-
* Adds `ConnectExpressShared::RouteHandlerCandidate` to the extent of `Express::RouteHandler`.
33+
* Add `ConnectExpressShared::RouteHandlerCandidate` to the extent of `Express::RouteHandler`.
3434
*/
3535
private class PromotedExpressCandidate extends Express::RouteHandler, HTTP::Servers::StandardRouteHandler {
3636

@@ -45,7 +45,7 @@ private class PromotedExpressCandidate extends Express::RouteHandler, HTTP::Serv
4545
}
4646

4747
/**
48-
* Adds `ConnectExpressShared::RouteHandlerCandidate` to the extent of `Connect::RouteHandler`.
48+
* Add `ConnectExpressShared::RouteHandlerCandidate` to the extent of `Connect::RouteHandler`.
4949
*/
5050
private class PromotedConnectCandidate extends Connect::RouteHandler, HTTP::Servers::StandardRouteHandler {
5151

0 commit comments

Comments
 (0)