Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/app/controllers/edit_credential.js')
-rw-r--r--js/app/controllers/edit_credential.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/app/controllers/edit_credential.js b/js/app/controllers/edit_credential.js
index 20c5df91..40842a4a 100644
--- a/js/app/controllers/edit_credential.js
+++ b/js/app/controllers/edit_credential.js
@@ -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));
}