Add null separator to hmac

This commit is contained in:
Erik Johnston 2016-07-06 11:04:44 +01:00
parent be3548f7e1
commit 0da24cac8b
2 changed files with 4 additions and 0 deletions

View file

@ -336,7 +336,9 @@ class RegisterRestServlet(ClientV1RestServlet):
digestmod=sha1,
)
want_mac.update(user)
want_mac.update("\x00")
want_mac.update(password)
want_mac.update("\x00")
want_mac.update("admin" if admin else "notadmin")
want_mac = want_mac.hexdigest()