From e42cd8a3de303759e38a5140b43a5b38bb80a5d9 Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 28 Feb 2013 20:47:17 -0300 Subject: Fix verification of encryption of received data. --- backends/leap_backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backends/leap_backend.py') 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'], -- cgit v1.2.3