summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-02-28 20:47:17 -0300
committerdrebs <drebs@leap.se>2013-02-28 20:47:17 -0300
commite42cd8a3de303759e38a5140b43a5b38bb80a5d9 (patch)
treec710dad5255d05ac326926320e6b1f908c6dcd80
parentf5616981e8ba043da71a21371c2cbfc5fcb5da56 (diff)
Fix verification of encryption of received data.
-rw-r--r--backends/leap_backend.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/leap_backend.py b/backends/leap_backend.py
index 9a2f6a20..3d423f5d 100644
--- a/backends/leap_backend.py
+++ b/backends/leap_backend.py
@@ -137,7 +137,8 @@ class LeapSyncTarget(HTTPSyncTarget):
# decrypt after receiving from server.
if not self._soledad:
raise NoSoledadInstance()
- if not self._soledad.is_encrypted_sym(entry['content']):
+ enc_json = json.loads(entry['content'])['_encrypted_json']
+ if not self._soledad.is_encrypted_sym(enc_json):
raise DocumentNotEncrypted(
"Incoming document from sync is not encrypted.")
doc = LeapDocument(entry['id'], entry['rev'],