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

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