mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 15:36:44 +00:00
🐛 Fix the security vulnerability where anyone can execute admin commands
This commit is contained in:
parent
c174571207
commit
33be295ac8
@ -12,7 +12,7 @@ class UserAdminCache(BaseService.Component):
|
||||
self.qname = "users:admin"
|
||||
|
||||
async def ismember(self, user_id: int) -> bool:
|
||||
return self.client.sismember(self.qname, user_id)
|
||||
return await self.client.sismember(self.qname, user_id)
|
||||
|
||||
async def get_all(self) -> List[int]:
|
||||
return [int(str_data) for str_data in await self.client.smembers(self.qname)]
|
||||
|
Loading…
Reference in New Issue
Block a user