[PM-33930] fix: Exclude items with invalid keys from TOTP section count#2477
Merged
matt-livefront merged 1 commit intomainfrom Mar 24, 2026
Merged
[PM-33930] fix: Exclude items with invalid keys from TOTP section count#2477matt-livefront merged 1 commit intomainfrom
matt-livefront merged 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2477 +/- ##
=======================================
Coverage 86.87% 86.87%
=======================================
Files 1846 1846
Lines 162969 162985 +16
=======================================
+ Hits 141572 141589 +17
+ Misses 21397 21396 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
KatherineInCode
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
PM-33930
📔 Objective
The "Verification codes" section count on the main vault screen was inflated when a login had a TOTP key set but the key was invalid (e.g.
otpauth://totpwith no secret).incrementTOTPCountonly checked whether the cipher had a TOTP key and the user had access — it didn't validate that the key could actually produce a code. The list-building path (totpItem(for:)) does attempt code generation and silently drops failures, so the two paths diverged, causing the displayed count to be higher than the number of items shown in the list.incrementTOTPCountnow attempts TOTP code generation (matching the validation already performed bytotpItem(for:)) and skips the count increment if generation fails.📸 Screenshots
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-03-23.at.13.52.34.mov
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-03-23.at.13.57.40.mov