diff options
author | Erik Johnston <erikj@jki.re> | 2018-07-05 10:04:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-05 10:04:20 +0100 |
commit | 1a886406770f4a51dd03c31c15fbd1e2d33ff202 (patch) | |
tree | 3a668e42377a871519e97fbeb8997758a5edbb91 /synapse/federation/transport/server.py | |
parent | Merge pull request #3481 from matrix-org/rav/fix_cachedescriptor_test (diff) | |
parent | More server_name validation (diff) | |
download | synapse-1a886406770f4a51dd03c31c15fbd1e2d33ff202.tar.xz |
Merge pull request #3483 from matrix-org/rav/more_server_name_validation
More server_name validation
Diffstat (limited to 'synapse/federation/transport/server.py')
-rw-r--r-- | synapse/federation/transport/server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py index 1180d4b69d..e1fdcc89dc 100644 --- a/synapse/federation/transport/server.py +++ b/synapse/federation/transport/server.py @@ -18,7 +18,7 @@ from twisted.internet import defer from synapse.api.urls import FEDERATION_PREFIX as PREFIX from synapse.api.errors import Codes, SynapseError, FederationDeniedError -from synapse.http.endpoint import parse_server_name +from synapse.http.endpoint import parse_and_validate_server_name from synapse.http.server import JsonResource from synapse.http.servlet import ( parse_json_object_from_request, parse_integer_from_args, parse_string_from_args, @@ -170,8 +170,9 @@ def _parse_auth_header(header_bytes): return value origin = strip_quotes(param_dict["origin"]) + # ensure that the origin is a valid server name - parse_server_name(origin) + parse_and_validate_server_name(origin) key = strip_quotes(param_dict["key"]) sig = strip_quotes(param_dict["sig"]) |