Skip to content
Snippets Groups Projects
Commit ac9345b4 authored by Erik Johnston's avatar Erik Johnston
Browse files

Check that we have auth headers and fail nicely

parent cd198dfe
No related branches found
No related tags found
No related merge requests found
......@@ -238,6 +238,11 @@ class TransportLayer(object):
auth_headers = request.requestHeaders.getRawHeaders(b"Authorization")
if not auth_headers:
raise SynapseError(
401, "Missing Authorization headers", Codes.UNAUTHORIZED,
)
for auth in auth_headers:
if auth.startswith("X-Matrix"):
(origin, key, sig) = parse_auth_header(auth)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment