From 7d04ae22372aa30539228e6c210708df8133b2a5 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 2 Nov 2016 11:38:09 -0400 Subject: [PATCH] use whole message to make hmac --- lbrynet/lbrynet_daemon/auth/util.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lbrynet/lbrynet_daemon/auth/util.py b/lbrynet/lbrynet_daemon/auth/util.py index 8a1e078a4..c1de700b5 100644 --- a/lbrynet/lbrynet_daemon/auth/util.py +++ b/lbrynet/lbrynet_daemon/auth/util.py @@ -3,6 +3,7 @@ import hmac import hashlib import yaml import os +import json import logging log = logging.getLogger(__name__) @@ -88,6 +89,4 @@ def initialize_api_key_file(key_path): def get_auth_message(message_dict): - to_auth = message_dict.get('method').encode('hex') - to_auth += str(message_dict.get('id')).encode('hex') - return to_auth.decode('hex') \ No newline at end of file + return json.dumps(message_dict, sort_keys=True) \ No newline at end of file