From c4d97ae8b0c19541947c5c3a978ed22e67293a0e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 19 Jul 2021 10:07:20 +0100 Subject: [PATCH] Check that object type is a string --- inbox.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inbox.py b/inbox.py index 83d67d041..b5baccebb 100644 --- a/inbox.py +++ b/inbox.py @@ -870,6 +870,11 @@ def _receiveUpdate(recentPostsCache: {}, session, baseDir: str, if debug: print('DEBUG: ' + messageJson['type'] + ' object has no type') 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 debug: print('DEBUG: "users" or "profile" missing from actor in ' +