Skip to content

Commit ac55cf9

Browse files
Update test and qldoc
1 parent 6fbae45 commit ac55cf9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

python/ql/lib/semmle/python/frameworks/Websockets.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module Websockets {
5050
* calls, or a special parameter that will be set when functions are called by an external
5151
* library.
5252
*
53-
* Use the predicate `WebSocket::instance()` to get references to instances of `websockets.asyncio.ServerConnection` and `websockets.sync.ServerConnection`.
53+
* Use the predicate `ServerConnection::instance()` to get references to instances of `websockets.asyncio.ServerConnection` and `websockets.sync.ServerConnection`.
5454
*/
5555
abstract class InstanceSource extends DataFlow::LocalSourceNode { }
5656

python/ql/test/library-tests/frameworks/websockets/response_test.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ def unix_route_handler(websocket, x): # $ MISSING: requestHandler routedParamet
3434
if __name__ == "__main__":
3535
import sys
3636
server = s1
37-
if len(sys.argv) > 1:
38-
if sys.argv[1] == "kw":
37+
args = sys.argv # $ threatModelSource[commandargs]=sys.argv
38+
if len(args) > 1:
39+
if args[1] == "kw":
3940
server = s2
40-
elif sys.argv[1] == "route":
41+
elif args[1] == "route":
4142
server = s3
42-
elif sys.argv[1] == "unix":
43+
elif args[1] == "unix":
4344
server = s4
44-
elif sys.argv[1] == "unix_route":
45+
elif args[1] == "unix_route":
4546
server = s5
4647
server.serve_forever()

0 commit comments

Comments
 (0)