summary refs log tree commit diff
path: root/synapse/http/client.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-05-13 11:05:06 -0700
committerRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-05-13 19:05:06 +0100
commit5a4b328f522e9d08248dc03613fb0529f7529dbb (patch)
treea9593782314649f749411b558d51e24d98fef5c7 /synapse/http/client.py
parent0.99.4rc1 (diff)
downloadsynapse-5a4b328f522e9d08248dc03613fb0529f7529dbb.tar.xz
Add ability to blacklist ip ranges for federation traffic (#5043)
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r--synapse/http/client.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py

index ddbfb72228..77fe68818b 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py
@@ -165,7 +165,8 @@ class BlacklistingAgentWrapper(Agent): ip_address, self._ip_whitelist, self._ip_blacklist ): logger.info( - "Blocking access to %s because of blacklist" % (ip_address,) + "Blocking access to %s due to blacklist" % + (ip_address,) ) e = SynapseError(403, "IP address blocked by IP blacklist entry") return defer.fail(Failure(e)) @@ -263,9 +264,6 @@ class SimpleHttpClient(object): uri (str): URI to query. data (bytes): Data to send in the request body, if applicable. headers (t.w.http_headers.Headers): Request headers. - - Raises: - SynapseError: If the IP is blacklisted. """ # A small wrapper around self.agent.request() so we can easily attach # counters to it