Check that object type is a string

main
Bob Mottram 2021-07-19 10:07:20 +01:00
parent 633e25692a
commit c4d97ae8b0
1 changed files with 5 additions and 0 deletions

View File

@ -870,6 +870,11 @@ def _receiveUpdate(recentPostsCache: {}, session, baseDir: str,
if debug: if debug:
print('DEBUG: ' + messageJson['type'] + ' object has no type') print('DEBUG: ' + messageJson['type'] + ' object has no type')
return False return False
if not isinstance(messageJson['object']['type'], str):
if debug:
print('DEBUG: ' + messageJson['type'] +
' object type is not string')
return False
if not hasUsersPath(messageJson['actor']): if not hasUsersPath(messageJson['actor']):
if debug: if debug:
print('DEBUG: "users" or "profile" missing from actor in ' + print('DEBUG: "users" or "profile" missing from actor in ' +