Fix hmac with non-ASCII passwords

This commit is contained in:
Otto Winter 2018-06-07 21:52:41 +02:00
parent 7b630bfb8b
commit e063f2aaea
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ def start_web_server(args):
PASSWORD = js.get('password') or PASSWORD
if PASSWORD:
PASSWORD = hmac.new(PASSWORD).digest()
PASSWORD = hmac.new(str(PASSWORD)).digest()
# Use the digest of the password as our cookie secret. This makes sure the cookie
# isn't too short. It, of course, enables local hash brute forcing (because the cookie
# secret can be brute forced without making requests). But the hashing algorithm used