Ignore message scope in message signatures

This commit is contained in:
Kristóf Tóth 2019-07-04 15:51:55 +02:00
parent 2c0aba2ffe
commit 80e42a4091

View File

@ -21,6 +21,7 @@ def message_checksum(message):
def sign_message(key, message):
message.pop('scope', None)
message.pop('signature', None)
signature = message_signature(key, message)
message['signature'] = b64encode(signature).decode()
@ -31,6 +32,7 @@ def message_signature(key, message):
def verify_message(key, message):
message.pop('scope', None)
message = deepcopy(message)
try:
signature_b64 = message.pop('signature')