fix(auth): prevent allowlist bypass via sender_id token splitting
This commit is contained in:
@@ -66,10 +66,7 @@ class BaseChannel(ABC):
|
||||
return False
|
||||
if "*" in allow_list:
|
||||
return True
|
||||
sender_str = str(sender_id)
|
||||
return sender_str in allow_list or any(
|
||||
p in allow_list for p in sender_str.split("|") if p
|
||||
)
|
||||
return str(sender_id) in allow_list
|
||||
|
||||
async def _handle_message(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user