mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-01-17 23:07:09 -05:00
Add null separator to hmac
This commit is contained in:
parent
be3548f7e1
commit
0da24cac8b
@ -32,7 +32,9 @@ def request_registration(user, password, server_location, shared_secret, admin=F
|
||||
)
|
||||
|
||||
mac.update(user)
|
||||
mac.update("\x00")
|
||||
mac.update(password)
|
||||
mac.update("\x00")
|
||||
mac.update("admin" if admin else "notadmin")
|
||||
|
||||
mac = mac.hexdigest()
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user