Record any unknown json sigtaure types

main
Bob Mottram 2021-05-04 14:06:27 +01:00
parent c3a91fc574
commit 857b788ae1
1 changed files with 18 additions and 0 deletions

View File

@ -2991,6 +2991,24 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
if unknownFile:
unknownFile.write(unknownContext + '\n')
unknownFile.close()
else:
print('Unrecognized jsonld signature type: ' +
jwebsigType)
unknownSignaturesFile = \
baseDir + '/accounts/unknownJsonSignatures.txt'
alreadyUnknown = False
if os.path.isfile(unknownSignaturesFile):
if jwebsigType in \
open(unknownSignaturesFile).read():
alreadyUnknown = True
if not alreadyUnknown:
unknownFile = open(unknownSignaturesFile, "a+")
if unknownFile:
unknownFile.write(jwebsigType + '\n')
unknownFile.close()
# strict enforcement of json signatures
if not hasJsonSignature: