From 11b0ef4698e1daa347e0d77d4d336bd015fd154b Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Mon, 1 Dec 2008 18:08:59 -0800 Subject: [PATCH] remove incorrect getter/setter for cleartext - it should not be stored inside the payload! --- services/sync/modules/base_records/crypto.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/services/sync/modules/base_records/crypto.js b/services/sync/modules/base_records/crypto.js index 1d8d6edfa77c..6fdb8dec4600 100644 --- a/services/sync/modules/base_records/crypto.js +++ b/services/sync/modules/base_records/crypto.js @@ -86,11 +86,6 @@ CryptoWrapper.prototype = { this.payload.encryption = value; }, - get cleartext() this.payload.cleartext, - set cleartext(value) { - this.payload.cleartext = value; - }, - get ciphertext() this.payload.ciphertext, set ciphertext(value) { this.payload.ciphertext = value; @@ -106,6 +101,7 @@ CryptoWrapper.prototype = { let symkey = yield meta.getKey(self.cb, privkey, passphrase); this.ciphertext = crypto.encrypt(json.encode([this.cleartext]), symkey, meta.bulkIV); + this.cleartext = null; self.done(); }, @@ -124,6 +120,7 @@ CryptoWrapper.prototype = { // note: payload is wrapped in an array, see _encrypt this.cleartext = json.decode(crypto.decrypt(this.ciphertext, symkey, meta.bulkIV))[0]; + this.ciphertext = null; self.done(this.cleartext); },