Check message length before storage in inbox queue

main
Bob Mottram 2019-11-15 23:43:07 +00:00
parent ef9056761b
commit 213d4bdf6e
1 changed files with 3 additions and 0 deletions

View File

@ -208,6 +208,9 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \
"""Saves the give json to the inbox queue for the person """Saves the give json to the inbox queue for the person
keyId specifies the actor sending the post keyId specifies the actor sending the post
""" """
if len(messageBytes)>10240:
print('WARN: inbox message too long '+str(len(messageBytes))+' bytes')
return None
originalDomain=domain originalDomain=domain
if ':' in domain: if ':' in domain:
domain=domain.split(':')[0] domain=domain.split(':')[0]