mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
cleanup of pwned password checker
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 902d72457c...e3b3e444db
@@ -982,12 +982,12 @@
|
|||||||
"message": "Complete your two-step login request using the new tab."
|
"message": "Complete your two-step login request using the new tab."
|
||||||
},
|
},
|
||||||
"checkPassword": {
|
"checkPassword": {
|
||||||
"message": "Check if the password have been previously exposed."
|
"message": "Check if password has been exposed."
|
||||||
},
|
},
|
||||||
"passwordExposed": {
|
"passwordExposed": {
|
||||||
"message": "This password have been previously exposed in data breaches!"
|
"message": "This password has been exposed in data breaches. You should change it."
|
||||||
},
|
},
|
||||||
"passwordSafe": {
|
"passwordSafe": {
|
||||||
"message": "This password was not found in a current data breach! It should be safe to use."
|
"message": "This password was not found in any known data breaches. It should be safe to use."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,18 +94,19 @@ angular
|
|||||||
$scope.showPassword = !$scope.showPassword;
|
$scope.showPassword = !$scope.showPassword;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.checkPassword = () => {
|
$scope.checkPassword = function () {
|
||||||
$analytics.eventTrack('Check Password');
|
if (!$scope.cipher.login || !$scope.cipher.login.password || $scope.cipher.login.password === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auditService
|
$analytics.eventTrack('Check Password');
|
||||||
.passwordLeaked($scope.cipher.login.password)
|
auditService.passwordLeaked($scope.cipher.login.password).then(function (matches) {
|
||||||
.then((matches) => {
|
if (matches != 0) {
|
||||||
if (matches != 0) {
|
toastr.error(i18nService.passwordExposed);
|
||||||
toastr.error(i18nService.passwordExposed, i18nService.errorsOccurred);
|
} else {
|
||||||
} else {
|
toastr.success(i18nService.passwordSafe);
|
||||||
toastr.success(i18nService.passwordSafe)
|
}
|
||||||
}
|
});
|
||||||
})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addField = function (type) {
|
$scope.addField = function (type) {
|
||||||
|
|||||||
@@ -112,18 +112,19 @@ angular
|
|||||||
$scope.showPassword = !$scope.showPassword;
|
$scope.showPassword = !$scope.showPassword;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.checkPassword = () => {
|
$scope.checkPassword = function () {
|
||||||
$analytics.eventTrack('Check Password');
|
if (!$scope.cipher.login || !$scope.cipher.login.password || $scope.cipher.login.password === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auditService
|
$analytics.eventTrack('Check Password');
|
||||||
.passwordLeaked($scope.cipher.login.password)
|
auditService.passwordLeaked($scope.cipher.login.password).then(function (matches) {
|
||||||
.then((matches) => {
|
if (matches != 0) {
|
||||||
if (matches != 0) {
|
toastr.error(i18nService.passwordExposed);
|
||||||
toastr.error(i18nService.passwordExposed, i18nService.errorsOccurred);
|
} else {
|
||||||
} else {
|
toastr.success(i18nService.passwordSafe);
|
||||||
toastr.success(i18nService.passwordSafe)
|
}
|
||||||
}
|
});
|
||||||
})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addField = function (type) {
|
$scope.addField = function (type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user