From 80e42a40916fcae64f896db99a0441b4f034a62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 4 Jul 2019 15:51:55 +0200 Subject: [PATCH] Ignore message scope in message signatures --- lib/tfw/crypto.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tfw/crypto.py b/lib/tfw/crypto.py index 05f1daa..562420b 100644 --- a/lib/tfw/crypto.py +++ b/lib/tfw/crypto.py @@ -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')