mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-09 01:17:16 +00:00
Ignore message scope in message signatures
This commit is contained in:
parent
2c0aba2ffe
commit
80e42a4091
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user