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

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

See merge request funkwhale/funkwhale!960
environments/review-front-340-9n9j9v/deployments/3368
Eliot Berriot 2019-11-27 13:58:24 +01:00
commit 449bb588a1
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -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: