From a0bd079b51f1075dcb08c9a7674c2700fd12a687 Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Tue, 18 Aug 2015 17:30:06 +0200 Subject: [PATCH] Fixed error in AES due to "use strict" directive --- frontend/delta/js/Clipperz/Crypto/AES.js | 5 +++-- frontend/delta/js/Clipperz/PM/Crypto.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/delta/js/Clipperz/Crypto/AES.js b/frontend/delta/js/Clipperz/Crypto/AES.js index 6fda601..cf16674 100644 --- a/frontend/delta/js/Clipperz/Crypto/AES.js +++ b/frontend/delta/js/Clipperz/Crypto/AES.js @@ -25,7 +25,7 @@ refer to http://www.clipperz.com. try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!"; -} +} // Dependency commented to avoid a circular reference //try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { @@ -824,7 +824,8 @@ MochiKit.Base.update(Clipperz.Crypto.AES, { //----------------------------------------------------------------------------- 'deferredDecrypt': function(aKey, someData) { - var deferredResult + var deferredResult; + var executionContext; var nonce; var message; var key; diff --git a/frontend/delta/js/Clipperz/PM/Crypto.js b/frontend/delta/js/Clipperz/PM/Crypto.js index d1d3306..91a1683 100644 --- a/frontend/delta/js/Clipperz/PM/Crypto.js +++ b/frontend/delta/js/Clipperz/PM/Crypto.js @@ -21,6 +21,7 @@ refer to http://www.clipperz.com. */ +"use strict"; if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } if (typeof(Clipperz.PM.Crypto) == 'undefined') { Clipperz.PM.Crypto = {}; } @@ -320,7 +321,7 @@ MochiKit.Base.update(Clipperz.PM.Crypto, { deferredResult.addCallback(MochiKit.Async.wait, 0.1); deferredResult.addCallback(Clipperz.Base.evalJSON); deferredResult.addErrback(function(anError) { - Clipperz.logError("Error while decrypting data [4]"); + Clipperz.logError("Error while decrypting data [3]"); throw Clipperz.Crypto.Base.exception.CorruptedMessage; }) } else {