improved security checks

This commit is contained in:
Devaev Maxim
2020-05-15 17:30:14 +03:00
parent a364e689c6
commit 2eef3061ce
7 changed files with 46 additions and 26 deletions

View File

@@ -67,6 +67,8 @@ class Plugin(BaseAuthService):
}
async def authorize(self, user: str, passwd: str) -> bool:
assert user == user.strip()
assert user
async with self.__lock:
return (await aiotools.run_async(self.__inner_authorize, user, passwd))