Skip to content

Commit 957e407

Browse files
committed
use getABoundCallbackParameter in SocketIO
1 parent 40822e1 commit 957e407

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

javascript/ql/src/semmle/javascript/frameworks/SocketIO.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ module SocketIO {
190190
|
191191
on = base.getAMethodCall(EventEmitter::on()) and
192192
on.getArgument(0).mayHaveStringValue(connect) and
193-
this = on.getCallback(1).getParameter(0)
193+
this = on.getABoundCallbackParameter(1, 0)
194194
)
195195
}
196196

javascript/ql/test/library-tests/frameworks/SocketIO/tests.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ test_SocketNode
122122
| tst.js:71:3:71:35 | socket. ... => {}) | socket.io namespace with path '/' |
123123
| tst.js:72:3:72:46 | socket. ... => {}) | socket.io namespace with path '/' |
124124
| tst.js:73:3:73:43 | socket. ... => {}) | socket.io namespace with path '/' |
125+
| tst.js:84:16:84:21 | socket | socket.io namespace with path '/' |
125126
test_ClientSendNode_getEventName
126127
| client2.js:14:1:14:32 | sock.em ... there") | data |
127128
| client2.js:16:1:16:36 | sock.wr ... => {}) | message |

0 commit comments

Comments
 (0)