Merge branch 'request-target-header' into 'develop'

Ensure signature code doesn't crash on (request-target) signature

See merge request funkwhale/funkwhale!960
This commit is contained in:
Eliot Berriot 2019-11-27 13:58:24 +01:00
commit 449bb588a1
1 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,9 @@ def verify_django(django_request, public_key):
expected = signature_headers.split(" ")
logger.debug("Signature expected headers: %s", expected)
for header in expected:
if header == "(request-target)":
# this one represent the request body, so not an actual HTTP header
continue
try:
headers[header]
except KeyError: