From 633e25692a3879bd033d81d114f677ca1a7b2ec8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 19 Jul 2021 10:03:56 +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 15a187237..83d67d041 100644 --- a/inbox.py +++ b/inbox.py @@ -713,6 +713,11 @@ def _receiveUndo(session, baseDir: str, httpPrefix: str, if debug: print('DEBUG: ' + messageJson['type'] + ' has no object type') return False + if not isinstance(messageJson['object']['type'], str): + if debug: + print('DEBUG: ' + messageJson['type'] + + ' type within object is not a string') + return False if not messageJson['object'].get('object'): if debug: print('DEBUG: ' + messageJson['type'] +