mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-24 22:37:38 -05:00
refac: check participation type before lookup (#34979)
The encrypted channel relay now rejects a participation value that is not a string before looking it up.
This commit is contained in:
1 parent
f605c1e4c5
commit
bf616b21df
1 file changed
+1
@@ -368,6 +368,7 @@ class Relay:
|
||||
return await self.reserve(action, sid, user, channel, data, state)
|
||||
require(state and data.get('session') == state['session'] and self.local.get(sid) == channel)
|
||||
pid = data.get('participation')
|
||||
require(isinstance(pid, str))
|
||||
member = state['members'].get(pid)
|
||||
require(member and member['sid'] == sid and member['user'] == user.id)
|
||||
member['seen'] = time.time()
|
||||
|
||||
Reference in new issue
Block a user