We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 682ff23 commit c674afbCopy full SHA for c674afb
javascript/ql/lib/semmle/javascript/frameworks/Express.qll
@@ -164,9 +164,9 @@ module Express {
164
*/
165
DataFlow::Node getRouteHandlerNode(int index) {
166
// The first argument is a URI pattern if it is a string. If it could possibly be
167
- // a function, we consider it to be a route handler, otherwise a URI pattern.
+ // a non-string value, we consider it to be a route handler, otherwise a URI pattern.
168
exists(AnalyzedNode firstArg | firstArg = this.getArgument(0).analyze() |
169
- if firstArg.getAType() = TTFunction()
+ if firstArg.getAType() != TTString()
170
then result = this.getArgument(index)
171
else (
172
index >= 0 and result = this.getArgument(index + 1)
0 commit comments