Skip to content

Commit 6a1c5a6

Browse files
committed
Validate client ID before using in log
1 parent 1ba0683 commit 6a1c5a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/murfey/server/websocket.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ async def connect(
4141

4242
@staticmethod
4343
def _register_new_client(client_id: int):
44+
if not isinstance(client_id, int):
45+
raise TypeError("'client_id' was not an 'int'")
46+
return None
4447
log.debug(f"Registering new client with ID {client_id}")
4548
new_client = ClientEnvironment(client_id=client_id, connected=True)
4649
murfey_db: Session = next(get_murfey_db_session())

0 commit comments

Comments
 (0)