encode
This commit is contained in:
parent
c32e22ac97
commit
ba33ced6ab
@ -69,7 +69,7 @@ def write(data):
|
|||||||
|
|
||||||
|
|
||||||
def validate_password(password):
|
def validate_password(password):
|
||||||
if not compare_digest(Session.password_hash, sha256(password).hexdigest()):
|
if not compare_digest(Session.password_hash, sha256(password.encode()).hexdigest()):
|
||||||
raise AuthError("Invalid user pass")
|
raise AuthError("Invalid user pass")
|
||||||
|
|
||||||
|
|
||||||
@ -269,4 +269,4 @@ async def a_main(*args, **kwargs):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
asyncio.run(a_main(Path("/tmp/mails"), 9995, password_hash=sha256("dummy").hexdigest()))
|
asyncio.run(a_main(Path("/tmp/mails"), 9995, password_hash=sha256("dummy".encode()).hexdigest()))
|
||||||
|
Loading…
Reference in New Issue
Block a user