Check that object type is a string

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

View File

@ -713,6 +713,11 @@ def _receiveUndo(session, baseDir: str, httpPrefix: str,
if debug: if debug:
print('DEBUG: ' + messageJson['type'] + ' has no object type') print('DEBUG: ' + messageJson['type'] + ' has no object type')
return False 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 not messageJson['object'].get('object'):
if debug: if debug:
print('DEBUG: ' + messageJson['type'] + print('DEBUG: ' + messageJson['type'] +