mirror of https://gitlab.com/bashrc2/epicyon
Only warn about json signature failures
parent
183141ee80
commit
be14587011
41
inbox.py
41
inbox.py
|
@ -2703,39 +2703,24 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: http header signature check success')
|
print('DEBUG: http header signature check success')
|
||||||
|
|
||||||
hasJsonSig = True
|
|
||||||
|
|
||||||
if not queueJson['post'].get('signature'):
|
if not queueJson['post'].get('signature'):
|
||||||
print('WARN: jsonld inbox signature signature missing from ' +
|
print('WARN: jsonld inbox signature signature missing from ' +
|
||||||
keyId)
|
keyId)
|
||||||
hasJsonSig = False
|
|
||||||
|
|
||||||
if not queueJson['post']['signature'].get('type'):
|
|
||||||
print('WARN: jsonld inbox signature type missing from ' +
|
|
||||||
keyId)
|
|
||||||
hasJsonSig = False
|
|
||||||
|
|
||||||
# if not jsonldVerify(queueJson['post'], pubKey):
|
|
||||||
# hasJsonSig = False
|
|
||||||
# if debug:
|
|
||||||
# print('**************************************')
|
|
||||||
# print('WARN: jsonld signature check failed ' +
|
|
||||||
# str(queueJson['post']))
|
|
||||||
# print('--------------------------------------')
|
|
||||||
# print(keyId)
|
|
||||||
# print(pubKey)
|
|
||||||
# print('**************************************')
|
|
||||||
# else:
|
# else:
|
||||||
# if debug:
|
# if not jsonldVerify(queueJson['post'], pubKey):
|
||||||
# print('jsonld inbox signature check success')
|
# hasJsonSig = False
|
||||||
|
# if debug:
|
||||||
|
# print('**************************************')
|
||||||
|
# print('WARN: jsonld signature check failed ' +
|
||||||
|
# str(queueJson['post']))
|
||||||
|
# print('--------------------------------------')
|
||||||
|
# print(keyId)
|
||||||
|
# print(pubKey)
|
||||||
|
# print('**************************************')
|
||||||
|
# else:
|
||||||
|
# if debug:
|
||||||
|
# print('jsonld inbox signature check success')
|
||||||
#
|
#
|
||||||
if not hasJsonSig:
|
|
||||||
# json signature check failed
|
|
||||||
if os.path.isfile(queueFilename):
|
|
||||||
os.remove(queueFilename)
|
|
||||||
if len(queue) > 0:
|
|
||||||
queue.pop(0)
|
|
||||||
continue
|
|
||||||
|
|
||||||
# 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
|
||||||
|
|
Loading…
Reference in New Issue