add support for express-ws

This commit is contained in:
erik-krogh
2023-02-12 23:25:27 +01:00
parent d55e9d5dac
commit 6474cfd4c8

View File

@@ -214,7 +214,13 @@ module ServerWebSocket {
class ServerSocket extends EventEmitter::Range, DataFlow::SourceNode {
LibraryName library;
ServerSocket() { this = getAConnectionCall(library).getCallback(1).getParameter(0) }
ServerSocket() {
this = getAConnectionCall(library).getCallback(1).getParameter(0)
or
// support for the express-ws library: https://www.npmjs.com/package/express-ws
library = ws() and
this = Express::appCreation().getAMemberCall("ws").getABoundCallbackParameter(1, 0)
}
/**
* Gets the name of the library that created this server socket.