Apply suggestions from code review
This commit is contained in:
parent
28b40df577
commit
e8b4907dfb
@ -79,7 +79,7 @@ async function validatePassword(password, checkBreached = false) {
|
||||
if (breachResult.breached) {
|
||||
return {
|
||||
ok: true,
|
||||
warning: `This password has been found ${breachResult.count.toLocaleString()} times in data breaches. Consider using a different password.`
|
||||
warning: {msg: "passwordFoundInDataBreach", meta: breachResult.count}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -1365,6 +1365,7 @@
|
||||
"Details": "Details",
|
||||
"passwordTooShort": "Password must be at least 12 characters long.",
|
||||
"passwordWeakWarning": "This password may be easy to guess. Consider using a longer or more unique password.",
|
||||
"passwordFoundInDataBreach": "This password has appeared in a known data breach (via Have I Been Pwned). Please choose a different password. | This password has appeared {n} times in known data breaches (via Have I Been Pwned). Please choose a different password.",
|
||||
"TLS Alerts": "TLS Alerts",
|
||||
"Expected TLS Alert": "Expected TLS Alert",
|
||||
"None (Successful Connection)": "None (Successful Connection)",
|
||||
|
||||
@ -120,7 +120,7 @@ export default {
|
||||
|
||||
// Show warning toast if password was found in breach database
|
||||
if (res.ok && res.warning) {
|
||||
this.$root.toastWarning(res.warning);
|
||||
this.$root.toastWarning(res.warning.msg, res.warning.meta);
|
||||
}
|
||||
|
||||
if (res.ok) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user