[PM-37168] Fix missing expiration check.#7760
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR adds a missing token expiration check to two delete-recovery flows ( Code Review DetailsNo findings. Note on existing bot threads: the |
|
| { | ||
| // Arrange | ||
| // Token has a matching provider Id but an expiration date two hours in the past. | ||
| var expiredTokenData = new ProviderDeleteTokenable(provider, -2); |
There was a problem hiding this comment.
expiredTokenData is being used in an out statement a few lines below. Looks like the compiler just didn't pick it up.
| sutProvider.GetDependency<IOrganizationRepository>().GetByIdAsync(organization.Id).Returns(organization); | ||
|
|
||
| // Token has a matching organization Id but an expiration date two hours in the past. | ||
| var expiredTokenData = new OrgDeleteTokenable(organization, -2); |
There was a problem hiding this comment.
expiredTokenData is being used in an out statement a few lines below. Looks like the compiler just didn't pick it up.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7760 +/- ##
=======================================
Coverage 60.84% 60.84%
=======================================
Files 2167 2167
Lines 96089 96089
Branches 8652 8652
=======================================
+ Hits 58464 58469 +5
+ Misses 35539 35532 -7
- Partials 2086 2088 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38128
📔 Objective
I added fixes to the identified locations and added test coverage for them.
It's a simple change, and I think the automated tests are sufficient.