Fix for non-shared credentials history

This commit is contained in:
brantje 2016-10-05 19:41:47 +02:00
parent cc6cc0251d
commit c08243fbdf
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
2 changed files with 10 additions and 1 deletions

View file

@ -211,6 +211,13 @@ angular.module('passmanApp')
};
$scope.saveCredential = function () {
if ($scope.new_custom_field.label && $scope.new_custom_field.value) {
$scope.storedCredential.custom_fields.push(angular.copy($scope.new_custom_field));
}
//@TODO validation
//@TODO When credential is expired and has renew interval set, calc new expire time.
delete $scope.storedCredential.password_repeat;

View file

@ -55,7 +55,9 @@ angular.module('passmanApp')
$scope.selectedRevision = angular.copy(revision);
if(!$scope.storedCredential.hasOwnProperty('acl') && $scope.storedCredential.hasOwnProperty('shared_key')){
key = EncryptService.decryptString(angular.copy($scope.storedCredential.shared_key));
if($scope.storedCredential.shared_key) {
key = EncryptService.decryptString(angular.copy($scope.storedCredential.shared_key));
}
}
if($scope.storedCredential.hasOwnProperty('acl')){
key = EncryptService.decryptString(angular.copy($scope.storedCredential.acl.shared_key));