From 3a854f803ad764a9f55c8e888b9cb44494d46254 Mon Sep 17 00:00:00 2001 From: John Cira Date: Sun, 22 Feb 2026 01:34:35 -0500 Subject: [PATCH 1/2] Fix health check reused password count tooltip (#13075) --- src/core/PasswordHealth.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/PasswordHealth.cpp b/src/core/PasswordHealth.cpp index 3a2e5571d..082b409f1 100644 --- a/src/core/PasswordHealth.cpp +++ b/src/core/PasswordHealth.cpp @@ -151,12 +151,11 @@ QSharedPointer HealthChecker::evaluate(const Entry* entry) const health->adjustScore(-penalty * (count - 1)); health->addScoreReason(QObject::tr("Password is used %1 time(s)", "", count).arg(QString::number(count))); // Add the first 20 uses of the password to prevent the details display from growing too large - for (int i = 0; i < used.size(); ++i) { + for (int i = 0; i < (count < 20 ? count : 20); ++i) { health->addScoreDetails(used[i]); - if (i == 19) { - health->addScoreDetails("…"); - break; - } + } + if (count > 20) { + health->addScoreDetails("..."); } // Don't allow re-used passwords to be considered "good" From 59df1d0d7c21cf29db8da3bfe1857140c04f122f Mon Sep 17 00:00:00 2001 From: John Cira Date: Mon, 2 Mar 2026 21:28:40 -0500 Subject: [PATCH 2/2] Update password count discrepancy fix --- src/core/PasswordHealth.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/PasswordHealth.cpp b/src/core/PasswordHealth.cpp index 082b409f1..ac698496b 100644 --- a/src/core/PasswordHealth.cpp +++ b/src/core/PasswordHealth.cpp @@ -151,12 +151,13 @@ QSharedPointer HealthChecker::evaluate(const Entry* entry) const health->adjustScore(-penalty * (count - 1)); health->addScoreReason(QObject::tr("Password is used %1 time(s)", "", count).arg(QString::number(count))); // Add the first 20 uses of the password to prevent the details display from growing too large - for (int i = 0; i < (count < 20 ? count : 20); ++i) { + for (int i = 0; i < used.size(); ++i) { + if (i == 20) { + health->addScoreDetails("…"); + break; + } health->addScoreDetails(used[i]); } - if (count > 20) { - health->addScoreDetails("..."); - } // Don't allow re-used passwords to be considered "good" // no matter how great their entropy is.