From fe03e9504954eb3db83365c0663482e468db54e2 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 14 Oct 2020 09:26:46 -0700 Subject: [PATCH] better bytes checking but this still seems like the wrong thing --- bookwyrm/incoming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/incoming.py b/bookwyrm/incoming.py index 54e2fb24a..042a524d8 100644 --- a/bookwyrm/incoming.py +++ b/bookwyrm/incoming.py @@ -38,9 +38,9 @@ def shared_inbox(request): try: resp = request.body - if isinstance(resp, bytes): - resp = json.loads(resp) activity = json.loads(resp) + if isinstance(resp, str): + resp = json.loads(resp) activity_object = activity['object'] except (json.decoder.JSONDecodeError, KeyError): return HttpResponseBadRequest()