mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 06:27:59 +00:00
Merge branch 'patch-2' into 'master'
Fix relay crashing on signed GET requests See merge request pleroma/relay!18
This commit is contained in:
commit
723f286f21
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue