diff --git a/inbox.py b/inbox.py index a2cf0ba8a..d780530ff 100644 --- a/inbox.py +++ b/inbox.py @@ -17,7 +17,7 @@ from languages import understoodPostLanguage from like import updateLikesCollection from reaction import updateReactionCollection from reaction import validEmojiContent -from utils import malformedCiphertext +from utils import invalidCiphertext from utils import removeHtml from utils import fileLastModified from utils import hasObjectString @@ -2259,7 +2259,7 @@ def _validPostContent(baseDir: str, nickname: str, domain: str, print('REJECT: reply to post which does not ' + 'allow comments: ' + originalPostId) return False - if malformedCiphertext(messageJson['object']['content']): + if invalidCiphertext(messageJson['object']['content']): print('REJECT: malformed ciphertext in content') return False if debug: diff --git a/utils.py b/utils.py index 5ac0351b6..7592bd1c1 100644 --- a/utils.py +++ b/utils.py @@ -2653,8 +2653,8 @@ def isPGPEncrypted(content: str) -> bool: return False -def malformedCiphertext(content: str) -> bool: - """Returns true if the given content contains a malformed key +def invalidCiphertext(content: str) -> bool: + """Returns true if the given content contains an invalid key """ if '----BEGIN ' in content or '----END ' in content: if not containsPGPPublicKey(content) and \