Don't accept replies from unidentifiable sources

master
Bob Mottram 2019-09-09 10:12:06 +01:00
parent f551325644
commit 8a1fb72ccb
1 changed files with 4 additions and 1 deletions

View File

@ -215,6 +215,9 @@ def savePostToInboxQueue(baseDir: str,httpPrefix: str, \
if isBlocked(baseDir,nickname,domain,replyNickname,replyDomain): if isBlocked(baseDir,nickname,domain,replyNickname,replyDomain):
print('WARN: post contains reply to a blocked account: '+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 postJsonObject['object'].get('content'):
if isinstance(postJsonObject['object']['content'], str): if isinstance(postJsonObject['object']['content'], str):
if isFiltered(baseDir,nickname,domain,postJsonObject['object']['content']): if isFiltered(baseDir,nickname,domain,postJsonObject['object']['content']):