Skip to content

Commit 49e5a22

Browse files
authored
Fixed code style for SockJS
also fixed appCreation, thanks to Erik Krogh.
1 parent ee0b65a commit 49e5a22

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed
Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/**
22
* Provides classes for working with [SockJS](http://sockjs.org).
33
*/
44

@@ -9,25 +9,26 @@ import DataFlow::PathGraph
99
* A model of the `SockJS` websocket data handler (https://sockjs.org).
1010
*/
1111
module SockJS {
12-
class SourceFromSocketJS extends RemoteFlowSource {
12+
class SourceFromSocketJS extends RemoteFlowSource {
1313
/**
14-
* Access to user-controlled data object received from websocket
14+
* Access to user-controlled data object received from websocket
1515
* For example:
1616
* ```
1717
* server.on('connection', function(conn) {
1818
* conn.on('data', function(message) {
1919
* ...
2020
* });
21-
* });
21+
* });
2222
* ```
23-
*/
23+
*/
2424
SourceFromSocketJS() {
25-
exists(DataFlow::CallNode createServer,
26-
DataFlow::CallNode connNode,
27-
DataFlow::CallNode dataHandlerNode |
28-
createServer = appCreation() and
25+
exists(
26+
DataFlow::CallNode createServer, DataFlow::CallNode connNode,
27+
DataFlow::CallNode dataHandlerNode
28+
|
29+
createServer = appCreation() and
2930
connNode = createServer.getAMethodCall("on") and
30-
connNode.getArgument(0).getStringValue() = "connection" and
31+
connNode.getArgument(0).getStringValue() = "connection" and
3132
dataHandlerNode = connNode.getCallback(1).getParameter(0).getAMethodCall("on") and
3233
dataHandlerNode.getArgument(0).getStringValue() = "data" and
3334
this = dataHandlerNode.getCallback(1).getParameter(0)
@@ -42,7 +43,5 @@ module SockJS {
4243
*/
4344
private DataFlow::CallNode appCreation() {
4445
result = DataFlow::moduleImport("sockjs").getAMemberCall("createServer")
45-
or
46-
result = DataFlow::moduleMember("sockjs", "createServer")
4746
}
4847
}

0 commit comments

Comments
 (0)