summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-10-30 11:12:23 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2019-02-13 14:24:42 +0000
commite750d031c828be6da1d2d491da7efeba82f0fa10 (patch)
tree8c6aeb1cf3984e466b73cacd7b7973627086af28
parentCast bacjup version to int when querying (diff)
downloadsynapse-e750d031c828be6da1d2d491da7efeba82f0fa10.tar.xz
Cast to int here too
-rw-r--r--synapse/storage/e2e_room_keys.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/e2e_room_keys.py b/synapse/storage/e2e_room_keys.py
index 2a012e9487..a1d203fd61 100644
--- a/synapse/storage/e2e_room_keys.py
+++ b/synapse/storage/e2e_room_keys.py
@@ -118,6 +118,11 @@ class EndToEndRoomKeyStore(SQLBaseStore):
             these room keys.
         """
 
+        try:
+            version = int(version)
+        except ValueError:
+            defer.returnValue({'rooms': {}})
+
         keyvalues = {
             "user_id": user_id,
             "version": version,