From 2c0aba2ffe63b0a046f1771690c9acc5e5e3dfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 4 Jul 2019 15:19:48 +0200 Subject: [PATCH] Fix bug where sign_message wasn't idempotent --- lib/tfw/crypto.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tfw/crypto.py b/lib/tfw/crypto.py index bdd1fad..05f1daa 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('signature', None) signature = message_signature(key, message) message['signature'] = b64encode(signature).decode()