cleanup of pwned password checker
This commit is contained in:
parent
e12ecb0c14
commit
ced108d1a6
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 902d72457cbeb99ef5d9eb69945ad43658f69277
|
Subproject commit e3b3e444dbff7e4541fa5367ee26bc7ed4d73b26
|
|
@ -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
|
|
||||||
.passwordLeaked($scope.cipher.login.password)
|
|
||||||
.then((matches) => {
|
|
||||||
if (matches != 0) {
|
|
||||||
toastr.error(i18nService.passwordExposed, i18nService.errorsOccurred);
|
|
||||||
} else {
|
|
||||||
toastr.success(i18nService.passwordSafe)
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
$analytics.eventTrack('Check Password');
|
||||||
|
auditService.passwordLeaked($scope.cipher.login.password).then(function (matches) {
|
||||||
|
if (matches != 0) {
|
||||||
|
toastr.error(i18nService.passwordExposed);
|
||||||
|
} else {
|
||||||
|
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
|
|
||||||
.passwordLeaked($scope.cipher.login.password)
|
|
||||||
.then((matches) => {
|
|
||||||
if (matches != 0) {
|
|
||||||
toastr.error(i18nService.passwordExposed, i18nService.errorsOccurred);
|
|
||||||
} else {
|
|
||||||
toastr.success(i18nService.passwordSafe)
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
$analytics.eventTrack('Check Password');
|
||||||
|
auditService.passwordLeaked($scope.cipher.login.password).then(function (matches) {
|
||||||
|
if (matches != 0) {
|
||||||
|
toastr.error(i18nService.passwordExposed);
|
||||||
|
} else {
|
||||||
|
toastr.success(i18nService.passwordSafe);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addField = function (type) {
|
$scope.addField = function (type) {
|
||||||
|
|
Loading…
Reference in New Issue