summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-08-24 12:23:39 +0100
committerGitHub <noreply@github.com>2018-08-24 12:23:39 +0100
commit84b4e76fedc8e26cb701bdddad094237bb30c0f7 (patch)
tree0f9757bfb06ccd5d6e3ad875c3cd6bc0eca93dae
parentMerge pull request #3753 from matrix-org/erikj/fix_no_server_noticse (diff)
parentNewsfile (diff)
downloadsynapse-84b4e76fedc8e26cb701bdddad094237bb30c0f7.tar.xz
Merge pull request #3754 from matrix-org/erikj/fix_whitelist hhs-1
Allow federation_domain_whitelist to be emtpy list
-rw-r--r--changelog.d/3754.bugfix1
-rw-r--r--synapse/http/matrixfederationclient.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/3754.bugfix b/changelog.d/3754.bugfix
new file mode 100644
index 0000000000..6e3ec80194
--- /dev/null
+++ b/changelog.d/3754.bugfix
@@ -0,0 +1 @@
+Fix 'federation_domain_whitelist' such that an empty list correctly blocks all outbound federation traffic
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 44b61e70a4..b34bb8e31a 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -133,7 +133,7 @@ class MatrixFederationHttpClient(object):
                 failures, connection failures, SSL failures.)
         """
         if (
-            self.hs.config.federation_domain_whitelist and
+            self.hs.config.federation_domain_whitelist is not None and
             destination not in self.hs.config.federation_domain_whitelist
         ):
             raise FederationDeniedError(destination)