Skip to content

Commit e5e3bb3

Browse files
authored
Generalize the server definition in plugin registration
1 parent 563a56a commit e5e3bb3

File tree

1 file changed

+3
-3
lines changed
  • javascript/ql/lib/semmle/javascript/frameworks

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ module Hapi {
2020
// `register (server, options)`
2121
// `module.exports.plugin = {register, pkg};`
2222
this =
23-
any(NodeModule m)
23+
any(Module m)
2424
.getAnExportedValue("plugin")
25-
.(DataFlow::ObjectLiteralNode)
25+
.getALocalSource()
2626
.getAPropertySource("register")
27-
.(DataFlow::FunctionNode)
27+
.getAFunctionValue()
2828
.getParameter(0)
2929
or
3030
// `const after = function (server) {...};`

0 commit comments

Comments
 (0)