summary refs log tree commit diff
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-12-11 13:31:39 -0500
committerHubert Chathi <hubert@uhoreg.ca>2019-12-11 13:31:39 -0500
commit020c2abafc4bc860f94952c665fa40e4f558cb93 (patch)
tree3526b2f7526b22756c804b39f9e44cfff87b674b
parenthandle the cache putting None into the dict, and raise instead of pass (diff)
downloadsynapse-020c2abafc4bc860f94952c665fa40e4f558cb93.tar.xz
add another check that the item is not None
-rw-r--r--synapse/handlers/e2e_keys.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py

index ca4d566dd9..2d889364d4 100644 --- a/synapse/handlers/e2e_keys.py +++ b/synapse/handlers/e2e_keys.py
@@ -296,7 +296,11 @@ class E2eKeysHandler(object): if "self_signing" in user_info: self_signing_keys[user_id] = user_info["self_signing"] - if from_user_id in keys and "user_signing" in keys[from_user_id]: + if ( + from_user_id in keys + and keys[from_user_id] is not None + and "user_signing" in keys[from_user_id] + ): # users can see other users' master and self-signing keys, but can # only see their own user-signing keys user_signing_keys[from_user_id] = keys[from_user_id]["user_signing"]