From 213d4bdf6e1d221a9ddda4bab284722fdb317f0c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 15 Nov 2019 23:43:07 +0000 Subject: [PATCH] Check message length before storage in inbox queue --- inbox.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inbox.py b/inbox.py index e7fdf9e31..4befca4d3 100644 --- a/inbox.py +++ b/inbox.py @@ -208,6 +208,9 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \ """Saves the give json to the inbox queue for the person 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 if ':' in domain: domain=domain.split(':')[0]