Fix security exploit :>

This commit is contained in:
Fierelier 2024-02-20 04:22:52 +01:00
parent 0ca14452bb
commit 374cc6a32b
1 changed files with 11 additions and 2 deletions

View File

@ -124,7 +124,11 @@ def clientLoopIn(self):
setClientData(self.cID,"bufferPacket",packet)
with clientsLock:
for cID in clients:
if getClientData(cID,"type") == "watch" and getClientData(cID,"args")["user"] == args["user"] and getClientData(cID,"args")["channel"] == args["channel"] and getClientData(cID,"args")["channel_password"] == args["channel_password"]:
if (
getClientData(cID,"type") == "watch" and
getClientData(cID,"args")["user"] == args["user"] and
getClientData(cID,"args")["channel"] == args["channel"]
):
getClientData(cID,"queue").put("")
if cmd[0] == "watch":
@ -134,7 +138,12 @@ def clientLoopIn(self):
with clientDataLock:
with clientsLock:
for cID in clients:
if getClientData(cID,"args")["user"] == args["user"] and getClientData(cID,"type") == "broadcast":
if (
getClientData(cID,"type") == "broadcast" and
getClientData(cID,"args")["user"] == args["user"] and
getClientData(cID,"args")["channel"] == args["channel"] and
getClientData(cID,"args")["channel_password"] == args["channel_password"]
):
watchID = cID
packet = getClientData(cID,"bufferPacket")