From 4081e30257b6b4de60d7d2098ba6ae69a99f92cf Mon Sep 17 00:00:00 2001 From: Bruno Wagner Goncalves Date: Thu, 4 Sep 2014 16:02:54 -0300 Subject: Leap mx will not stop working for everyone if an user is inconsistent --- src/leap/mx/couchdbhelper.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/leap/mx/couchdbhelper.py b/src/leap/mx/couchdbhelper.py index 41604ba..f20f1dd 100644 --- a/src/leap/mx/couchdbhelper.py +++ b/src/leap/mx/couchdbhelper.py @@ -171,7 +171,11 @@ class ConnectedCouchDB(client.CouchDB): :rtype: str or None """ for row in result["rows"]: - if row["doc"]["user_id"] == uuid: + user_id = row["doc"].get("user_id") + if not user_id: + print("User %s is in an inconsistent state") + continue + if user_id == uuid: return row["value"] return None -- cgit v1.2.3 From a5b1d1cdd6bbe224d5e1519024d705e1b0d4fbf4 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Goncalves Date: Mon, 8 Sep 2014 11:40:37 -0300 Subject: Added changes file --- changes/user_id_wont_break_mx | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changes/user_id_wont_break_mx diff --git a/changes/user_id_wont_break_mx b/changes/user_id_wont_break_mx new file mode 100644 index 0000000..0631118 --- /dev/null +++ b/changes/user_id_wont_break_mx @@ -0,0 +1,2 @@ + o Any inconsistent user would make the mx stop decrypting mails for all + subsequent users -- cgit v1.2.3