fixes
This commit is contained in:
parent
ad40641646
commit
7ac8914bf5
2 changed files with 14 additions and 10 deletions
|
|
@ -9,11 +9,6 @@ function EncryptedInsightStorage(config) {
|
|||
}
|
||||
inherits(EncryptedInsightStorage, InsightStorage);
|
||||
|
||||
|
||||
EncryptedInsightStorage.prototype._brokenDecryptUndef = function(body) {
|
||||
cryptoUtil.decrypt('undefined' + SEPARATOR + 'undefined', body);
|
||||
};
|
||||
|
||||
EncryptedInsightStorage.prototype._brokenDecrypt = function(body) {
|
||||
var key = cryptoUtil.kdf(this.password + this.email, 'mjuBtGybi/4=', 100);
|
||||
log.debug('Trying legacy decrypt')
|
||||
|
|
@ -35,10 +30,6 @@ EncryptedInsightStorage.prototype.getItem = function(name, callback) {
|
|||
decryptedJson = self._brokenDecrypt(body);
|
||||
}
|
||||
|
||||
if (!decryptedJson) {
|
||||
decryptedJson = self._brokenDecryptUndef(body);
|
||||
}
|
||||
|
||||
if (!decryptedJson) {
|
||||
log.debug('Could not decrypt value.');
|
||||
return callback('PNOTFOUND');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue