From 61d662a743176f00ab37daa22adf1a4b16e5c7aa Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Fri, 28 Dec 2007 16:33:09 -0800 Subject: [PATCH] Bug 409908: don't decrypt cleartext. Also, fix broken checkStatus calls when resetting server data. --- services/sync/modules/crypto.js | 1 + services/sync/modules/engines.js | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/services/sync/modules/crypto.js b/services/sync/modules/crypto.js index 155fff6b32d..c351f093833 100644 --- a/services/sync/modules/crypto.js +++ b/services/sync/modules/crypto.js @@ -183,6 +183,7 @@ WeaveCrypto.prototype = { switch (algorithm) { case "none": ret = data; + break; case "XXTEA": case "XXXTEA": // Weave 0.1.12.10 and below had this typo this._log.debug("Decrypting data"); diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index a24850f8f6c..fe1555caae9 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -149,9 +149,12 @@ Engine.prototype = { this._dav.unlock.async(this._dav, cont); let unlocked = yield; - checkStatus(statusResp.status, "Could not delete status file.", true); - checkStatus(snapshotResp.status, "Could not delete snapshot file.", true); - checkStatus(deltasResp.status, "Could not delete deltas file.", true); + this._checkStatus(statusResp.status, + "Could not delete status file.", true); + this._checkStatus(snapshotResp.status, + "Could not delete snapshot file.", true); + this._checkStatus(deltasResp.status, + "Could not delete deltas file.", true); this._log.debug("Server files deleted"); done = true;