Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions change-notes/1.20/analysis-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Support for many frameworks and libraries has been improved, in particular including the following:
- [a-sync-waterfall](https://www.npmjs.com/package/a-sync-waterfall)
- [Electron](https://electronjs.org)
- [Express](https://npmjs.org/express)
- [hapi](https://hapijs.com/)
- [js-cookie](https://github.com/js-cookie/js-cookie)
- [React](https://reactjs.org/)
Expand Down
7 changes: 4 additions & 3 deletions javascript/ql/src/semmle/javascript/frameworks/Express.qll
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,15 @@ module Express {
}

/**
* An argument passed to the `send` method of an HTTP response object.
* An argument passed to the `send` or `end` method of an HTTP response object.
*/
private class ResponseSendArgument extends HTTP::ResponseSendArgument {
RouteHandler rh;

ResponseSendArgument() {
exists(MethodCallExpr mce |
mce.calls(rh.getAResponseExpr(), "send") and
exists(MethodCallExpr mce, string name |
mce.calls(rh.getAResponseExpr(), name) and
(name = "send" or name = "end") and
this = mce.getArgument(0)
)
}
Expand Down