summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-04-03 11:41:28 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-04-03 11:41:28 +0100
commit999f7db6b0ad735ee7c952858cc19d617aac61b4 (patch)
treeaba24792876d1f7b84b9b7598a9c7a28a91ac746
parentNone is very different from [] (diff)
downloadsynapse-999f7db6b0ad735ee7c952858cc19d617aac61b4.tar.xz
Don't break logic when refactoring
-rw-r--r--synapse/http/matrixfederationclient.py2
-rw-r--r--synapse/rest/key/v2/remote_key_resource.py2
-rw-r--r--synapse/rest/media/v1/media_repository.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 36d1015514..b834d06219 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -283,7 +283,7 @@ class MatrixFederationHttpClient(object):
         else:
             _sec_timeout = self.default_timeout
 
-        if (self.hs.config.federation_domain_whitelist and
+        if (self.hs.config.federation_domain_whitelist is not None and
                 request.destination not in self.hs.config.federation_domain_whitelist):
             raise FederationDeniedError(request.destination)
 
diff --git a/synapse/rest/key/v2/remote_key_resource.py b/synapse/rest/key/v2/remote_key_resource.py
index 426c05e79c..5a14cfd426 100644
--- a/synapse/rest/key/v2/remote_key_resource.py
+++ b/synapse/rest/key/v2/remote_key_resource.py
@@ -139,7 +139,7 @@ class RemoteKey(Resource):
 
         store_queries = []
         for server_name, key_ids in query.items():
-            if (self.federation_domain_whitelist and
+            if (self.federation_domain_whitelist is not None and
                     server_name not in self.federation_domain_whitelist):
                 logger.debug("Federation denied with %s", server_name)
                 continue
diff --git a/synapse/rest/media/v1/media_repository.py b/synapse/rest/media/v1/media_repository.py
index 8b16ceb3e9..40b10e68c0 100644
--- a/synapse/rest/media/v1/media_repository.py
+++ b/synapse/rest/media/v1/media_repository.py
@@ -269,7 +269,7 @@ class MediaRepository(object):
         Returns:
             Deferred[dict]: The media_info of the file
         """
-        if (self.federation_domain_whitelist and
+        if (self.federation_domain_whitelist is not None and
                 server_name not in self.federation_domain_whitelist):
             raise FederationDeniedError(server_name)