mirror of https://gitlab.com/bashrc2/epicyon
Optional name check
parent
23af727bec
commit
243a0a50fd
|
@ -1673,9 +1673,6 @@ def validSendingActor(session, baseDir: str,
|
||||||
if not actorJson:
|
if not actorJson:
|
||||||
# if the actor couldn't be obtained then proceed anyway
|
# if the actor couldn't be obtained then proceed anyway
|
||||||
return True
|
return True
|
||||||
if not actorJson.get('name'):
|
|
||||||
print('REJECT: no name within actor ' + str(actorJson))
|
|
||||||
return False
|
|
||||||
if not actorJson.get('preferredUsername'):
|
if not actorJson.get('preferredUsername'):
|
||||||
print('REJECT: no preferredUsername within actor ' + str(actorJson))
|
print('REJECT: no preferredUsername within actor ' + str(actorJson))
|
||||||
return False
|
return False
|
||||||
|
@ -1689,7 +1686,8 @@ def validSendingActor(session, baseDir: str,
|
||||||
return False
|
return False
|
||||||
bioStr = removeHtml(actorJson['summary'])
|
bioStr = removeHtml(actorJson['summary'])
|
||||||
bioStr += ' ' + removeHtml(actorJson['preferredUsername'])
|
bioStr += ' ' + removeHtml(actorJson['preferredUsername'])
|
||||||
bioStr += ' ' + removeHtml(actorJson['name'])
|
if actorJson.get('name'):
|
||||||
|
bioStr += ' ' + removeHtml(actorJson['name'])
|
||||||
if containsInvalidChars(bioStr):
|
if containsInvalidChars(bioStr):
|
||||||
print('REJECT: post actor bio contains invalid characters')
|
print('REJECT: post actor bio contains invalid characters')
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue