We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b680628 commit bdaf0aaCopy full SHA for bdaf0aa
aiohttp_remotes/basic_auth.py
@@ -1,5 +1,6 @@
1
import base64
2
import binascii
3
+from secrets import compare_digest
4
from typing import Awaitable, Callable, Iterable
5
6
from typing_extensions import NoReturn
@@ -58,7 +59,9 @@ async def middleware(
58
59
60
username, password = credentials
61
- if username != self._username or password != self._password:
62
+ if username != self._username or not compare_digest(
63
+ password, self._password
64
+ ):
65
return await self.raise_error(request)
66
67
return await handler(request)
0 commit comments