mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-12 19:27:17 +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):
|
def sign_message(key, message):
|
||||||
|
message.pop('scope', None)
|
||||||
message.pop('signature', None)
|
message.pop('signature', None)
|
||||||
signature = message_signature(key, message)
|
signature = message_signature(key, message)
|
||||||
message['signature'] = b64encode(signature).decode()
|
message['signature'] = b64encode(signature).decode()
|
||||||
@ -31,6 +32,7 @@ def message_signature(key, message):
|
|||||||
|
|
||||||
|
|
||||||
def verify_message(key, message):
|
def verify_message(key, message):
|
||||||
|
message.pop('scope', None)
|
||||||
message = deepcopy(message)
|
message = deepcopy(message)
|
||||||
try:
|
try:
|
||||||
signature_b64 = message.pop('signature')
|
signature_b64 = message.pop('signature')
|
||||||
|
Loading…
Reference in New Issue
Block a user