Fix relay crashing on signed GET requests

This commit is contained in:
Thibaut Girka 2019-07-31 05:36:23 +00:00
parent 2eb17041b1
commit e56d909fe2
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ async def http_signatures_middleware(app, handler):
async def http_signatures_handler(request): async def http_signatures_handler(request):
request['validated'] = False request['validated'] = False
if 'signature' in request.headers: if 'signature' in request.headers and request.method == 'POST':
data = await request.json() data = await request.json()
if 'actor' not in data: if 'actor' not in data:
raise aiohttp.web.HTTPUnauthorized(body='signature check failed, no actor in message') raise aiohttp.web.HTTPUnauthorized(body='signature check failed, no actor in message')