mirror of
https://github.com/nextcloud/passman.git
synced 2025-11-08 05:04:04 +08:00
set compromised to false if password has been changed
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
This commit is contained in:
parent
2a1c5b2777
commit
bd3f92741d
2 changed files with 9 additions and 3 deletions
|
|
@ -105,9 +105,6 @@
|
|||
}
|
||||
angular.merge($scope.active_vault.credentials, _credentials);
|
||||
$scope.show_spinner = false;
|
||||
|
||||
console.log($scope.active_vault.credentials)
|
||||
|
||||
$rootScope.$broadcast('credentials_loaded');
|
||||
$rootScope.vaultCache[$scope.active_vault.guid] = angular.copy($scope.active_vault);
|
||||
if(!vault.private_sharing_key){
|
||||
|
|
|
|||
|
|
@ -113,6 +113,9 @@
|
|||
$scope.storedCredential.expire_time = $scope.storedCredential.expire_time * 1000;
|
||||
}
|
||||
|
||||
//store password to check if it was changed if this credential has been compromised
|
||||
$scope.oldPassword=$scope.storedCredential.password;
|
||||
|
||||
$scope.getTags = function ($query) {
|
||||
return TagService.searchTag($query);
|
||||
};
|
||||
|
|
@ -301,6 +304,12 @@
|
|||
$scope.saveCredential = function () {
|
||||
$scope.saving = true;
|
||||
|
||||
if($scope.storedCredential.compromised){
|
||||
if($scope.oldPassword !== $scope.storedCredential.password){
|
||||
$scope.storedCredential.compromised=false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($scope.new_custom_field.label && $scope.new_custom_field.value) {
|
||||
$scope.storedCredential.custom_fields.push(angular.copy($scope.new_custom_field));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue