Apply suggestions from code review

This commit is contained in:
Frank Elsinga 2026-01-18 17:46:53 +01:00 committed by GitHub
parent 28b40df577
commit e8b4907dfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@ async function validatePassword(password, checkBreached = false) {
if (breachResult.breached) { if (breachResult.breached) {
return { return {
ok: true, 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}
}; };
} }
} }

View File

@ -1365,6 +1365,7 @@
"Details": "Details", "Details": "Details",
"passwordTooShort": "Password must be at least 12 characters long.", "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.", "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", "TLS Alerts": "TLS Alerts",
"Expected TLS Alert": "Expected TLS Alert", "Expected TLS Alert": "Expected TLS Alert",
"None (Successful Connection)": "None (Successful Connection)", "None (Successful Connection)": "None (Successful Connection)",

View File

@ -120,7 +120,7 @@ export default {
// Show warning toast if password was found in breach database // Show warning toast if password was found in breach database
if (res.ok && res.warning) { if (res.ok && res.warning) {
this.$root.toastWarning(res.warning); this.$root.toastWarning(res.warning.msg, res.warning.meta);
} }
if (res.ok) { if (res.ok) {