diff --git a/viera/actor.py b/viera/actor.py index c1355cd..a63a9a4 100644 --- a/viera/actor.py +++ b/viera/actor.py @@ -118,7 +118,7 @@ processors = { async def inbox(request): - data = await request.json(content_type=None) + data = await request.json() if 'actor' not in data or not request['validated']: raise aiohttp.web.HTTPUnauthorized(body='access denied', content_type='text/plain') diff --git a/viera/http_signatures.py b/viera/http_signatures.py index 0cba6d7..9c6f81a 100644 --- a/viera/http_signatures.py +++ b/viera/http_signatures.py @@ -102,7 +102,7 @@ async def http_signatures_middleware(app, handler): request['validated'] = False if 'signature' in request.headers: - data = await request.json(content_type=None) + data = await request.json() if 'actor' not in data: raise aiohttp.web.HTTPUnauthorized(body='signature check failed, no actor in message') diff --git a/viera/remote_actor.py b/viera/remote_actor.py index d1862f9..14d2db3 100644 --- a/viera/remote_actor.py +++ b/viera/remote_actor.py @@ -9,6 +9,6 @@ async def fetch_actor(uri, force=False): async with aiohttp.ClientSession() as session: async with session.get(uri, headers={'Accept': 'application/activity+json'}) as resp: - ACTORS[uri] = (await resp.json()) + ACTORS[uri] = (await resp.json(content_type=None)) DATABASE["actors"] = ACTORS return ACTORS[uri]