merge-requests/30/head
Bob Mottram 2021-01-03 18:42:39 +00:00
parent edf0c8880e
commit 5a327d281e
1 changed files with 12 additions and 11 deletions

View File

@ -2710,18 +2710,19 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
queueJson['original'].get('signature'): queueJson['original'].get('signature'):
# 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
print('inbox signature: ' + str(pubKey))
print('inbox signature: ' + str(queueJson['original'])) print('inbox signature: ' + str(queueJson['original']))
if not jsonldVerify(queueJson['original'], pubKey): # if not jsonldVerify(queueJson['original'], pubKey):
print('WARN: jsonld inbox signature check failed ' + # print('WARN: jsonld inbox signature check failed ' +
keyId + ' ' + pubKey + ' ' + # keyId + ' ' + pubKey + ' ' +
str(queueJson['original'])) # str(queueJson['original']))
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') # print('jsonld inbox signature check success')
# set the id to the same as the post filename # set the id to the same as the post filename
# This makes the filename and the id consistent # This makes the filename and the id consistent