Skip to content

Commit 12b985b

Browse files
esbenaerik-krogh
andauthored
Update javascript/ql/src/Security/CWE-730/ServerCrash.ql
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
1 parent d591c51 commit 12b985b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

javascript/ql/src/Security/CWE-730/ServerCrash.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Function invokedByRouteHandler(HTTP::RouteHandler rh) {
4040
// follow the immediate call graph
4141
exists(DataFlow::InvokeNode invk |
4242
result = invk.getACallee() and
43+
// purposely not checking for `getEnclosingTryCatchStmt`. An async callback called from inside a try-catch can still crash the server.
4344
invk.getEnclosingFunction() = invokedByRouteHandler(rh)
4445
)
4546
// if new edges are added here, the `edges` predicate should be updated accordingly

0 commit comments

Comments
 (0)