Only use json signatures on outgoing posts unless verify all signatures is enabled

main
Bob Mottram 2021-01-05 20:55:11 +00:00
parent 2ce7456e28
commit e5c4d9e69b
1 changed files with 6 additions and 6 deletions

View File

@ -2741,7 +2741,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
queue.pop(0) queue.pop(0)
continue continue
if checkJsonSignature: if checkJsonSignature and verifyAllSignatures:
# use the original json message received, not one which may have # use the original json message received, not one which may have
# been modified along the way # been modified along the way
if not verifyJsonSignature(originalJson, pubKey): if not verifyJsonSignature(originalJson, pubKey):
@ -2751,11 +2751,11 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
else: else:
print('WARN: jsonld inbox signature check failed ' + print('WARN: jsonld inbox signature check failed ' +
keyId) keyId)
# if os.path.isfile(queueFilename): if os.path.isfile(queueFilename):
# os.remove(queueFilename) os.remove(queueFilename)
# if len(queue) > 0: if len(queue) > 0:
# queue.pop(0) queue.pop(0)
# continue continue
else: else:
print('jsonld inbox signature check success ' + keyId) print('jsonld inbox signature check success ' + keyId)