More standard terminology

merge-requests/30/head
Bob Mottram 2021-11-22 12:05:09 +00:00
parent 442c4f4daa
commit b6fda529d1
2 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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 \