From 8a1fb72ccbdb179cd5d14b6780b72fc350cecfe4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 9 Sep 2019 10:12:06 +0100 Subject: [PATCH] Don't accept replies from unidentifiable sources --- inbox.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inbox.py b/inbox.py index 1d6ac2491..8205aa740 100644 --- a/inbox.py +++ b/inbox.py @@ -214,7 +214,10 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \ if replyNickname and replyDomain: if isBlocked(baseDir,nickname,domain,replyNickname,replyDomain): print('WARN: post contains reply to a blocked account: '+replyNickname+'@'+replyDomain) - return None + return None + else: + print('WARN: post is a reply to an unidentified account: '+postJsonObject['object']['inReplyTo']) + return None if postJsonObject['object'].get('content'): if isinstance(postJsonObject['object']['content'], str): if isFiltered(baseDir,nickname,domain,postJsonObject['object']['content']):