fix credential resharing

Signed-off-by: binsky <timo@binsky.org>
This commit is contained in:
binsky 2021-09-07 21:08:23 +02:00
parent 2714853195
commit 44ceba586c

View file

@ -216,7 +216,7 @@
this.parent.plain_credential = service.decryptCredential(credential, this.parent.old_password);
var tmp = angular.copy(this.parent.plain_credential);
if (tmp.hasOwnProperty('shared_key') && tmp.shared_key !== null && !skipSharingKey) {
if (tmp.hasOwnProperty('shared_key') && tmp.shared_key !== null && tmp.shared_key !== '' && !skipSharingKey) {
var shared_key = EncryptService.decryptString(angular.copy(tmp.shared_key)).trim();
tmp.shared_key = EncryptService.encryptString(angular.copy(shared_key), this.parent.new_password);
tmp.set_share_key = true;