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:
Classic298 authored and GitHub committed 2026-11-25 03:01:35 +04:00
1 parent f605c1e4c5
commit bf616b21df
1 file changed
+1
+1
View File
@@ -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()