mirror of https://gitlab.com/bashrc2/epicyon
Limit json signature checking to strict mode
parent
584fe93b56
commit
0a5c65e9a2
13
inbox.py
13
inbox.py
|
@ -2734,7 +2734,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(queueJson['original'], pubKey):
|
if not verifyJsonSignature(queueJson['original'], pubKey):
|
||||||
|
@ -2745,12 +2745,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 verifyAllSignatures:
|
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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue