kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Merge branch 'request-target-header' into 'develop'
Ensure signature code doesn't crash on (request-target) signature See merge request funkwhale/funkwhale!960environments/review-front-340-9n9j9v/deployments/3368
commit
449bb588a1
|
@ -67,6 +67,9 @@ def verify_django(django_request, public_key):
|
||||||
expected = signature_headers.split(" ")
|
expected = signature_headers.split(" ")
|
||||||
logger.debug("Signature expected headers: %s", expected)
|
logger.debug("Signature expected headers: %s", expected)
|
||||||
for header in expected:
|
for header in expected:
|
||||||
|
if header == "(request-target)":
|
||||||
|
# this one represent the request body, so not an actual HTTP header
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
headers[header]
|
headers[header]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Ładowanie…
Reference in New Issue