mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 12:02:16 +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"
|
self.qname = "users:admin"
|
||||||
|
|
||||||
async def ismember(self, user_id: int) -> bool:
|
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]:
|
async def get_all(self) -> List[int]:
|
||||||
return [int(str_data) for str_data in await self.client.smembers(self.qname)]
|
return [int(str_data) for str_data in await self.client.smembers(self.qname)]
|
||||||
|
Loading…
Reference in New Issue
Block a user