summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-19 12:49:38 +0100
committerErik Johnston <erik@matrix.org>2015-05-19 12:49:38 +0100
commit2b7120e233999c4c89edb46b2714238e828aacc6 (patch)
treea7365d4e64e60686cc9b5b4386b97391018cef32 /synapse
parentDon't reuse var names (diff)
downloadsynapse-2b7120e233999c4c89edb46b2714238e828aacc6.tar.xz
SYN-383: Handle the fact the server might not have signed things
Diffstat (limited to 'synapse')
-rwxr-xr-xsynapse/app/homeserver.py6
-rw-r--r--synapse/crypto/keyring.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index dfb5314ff7..2e11ac062f 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -85,10 +85,10 @@ class SynapseHomeServer(HomeServer):
         return MatrixFederationHttpClient(self)
 
     def build_resource_for_client(self):
-        return gz_wrap(ClientV1RestResource(self))
+        return ClientV1RestResource(self)
 
     def build_resource_for_client_v2_alpha(self):
-        return gz_wrap(ClientV2AlphaRestResource(self))
+        return ClientV2AlphaRestResource(self)
 
     def build_resource_for_federation(self):
         return JsonResource(self)
@@ -97,7 +97,7 @@ class SynapseHomeServer(HomeServer):
         import syweb
         syweb_path = os.path.dirname(syweb.__file__)
         webclient_path = os.path.join(syweb_path, "webclient")
-        return GzipFile(webclient_path)  # TODO configurable?
+        return File(webclient_path)  # TODO configurable?
 
     def build_resource_for_static_content(self):
         # This is old and should go away: not going to bother adding gzip
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py
index 1f24e58ba0..a061def16a 100644
--- a/synapse/crypto/keyring.py
+++ b/synapse/crypto/keyring.py
@@ -329,7 +329,7 @@ class Keyring(object):
                 verify_key.time_added = time_now_ms
                 old_verify_keys[key_id] = verify_key
 
-        for key_id in response_json["signatures"][server_name]:
+        for key_id in response_json["signatures"].get(server_name, {}):
             if key_id not in response_json["verify_keys"]:
                 raise ValueError(
                     "Key response must include verification keys for all"