mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
clear enc key from memory on lock as well
This commit is contained in:
parent
e079b70e6a
commit
6e9d4e8d6e
@ -284,13 +284,18 @@ function initCryptoService(constantsService) {
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
CryptoService.prototype.clearEncKey = function () {
|
||||
CryptoService.prototype.clearEncKey = function (memoryOnly) {
|
||||
var deferred = Q.defer();
|
||||
|
||||
_encKey = null;
|
||||
if (memoryOnly) {
|
||||
deferred.resolve();
|
||||
}
|
||||
else {
|
||||
chrome.storage.local.remove('encKey', function () {
|
||||
deferred.resolve();
|
||||
});
|
||||
}
|
||||
|
||||
return deferred.promise;
|
||||
};
|
||||
|
@ -73,7 +73,8 @@ function initLockService(self) {
|
||||
return Q.all([
|
||||
self.cryptoService.clearKey(),
|
||||
self.cryptoService.clearOrgKeys(true),
|
||||
self.cryptoService.clearPrivateKey(true)
|
||||
self.cryptoService.clearPrivateKey(true),
|
||||
self.cryptoService.clearEncKey(true)
|
||||
]).then(function () {
|
||||
self.setIcon();
|
||||
self.folderService.clearCache();
|
||||
|
Loading…
Reference in New Issue
Block a user