[PR #2808] [MERGED] [PM-4081] Fix crash on export page #9962

Closed
opened 2026-04-11 02:32:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2808
Author: @aj-rosado
Created: 10/2/2023
Status: Merged
Merged: 10/3/2023
Merged by: @aj-rosado

Base: masterHead: bugfix/PM-4081-export-crash


📝 Commits (1)

  • 306b233 Added GetOrDeriveMasterKey to UserVerificationService

📊 Changes

4 files changed (+16 additions, -8 deletions)

View changed files

📝 src/App/Services/MobilePasswordRepromptService.cs (+1 -7)
📝 src/Core/Abstractions/ICryptoService.cs (+1 -0)
📝 src/Core/Services/CryptoService.cs (+11 -0)
📝 src/Core/Services/UserVerificationService.cs (+3 -1)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Application is crashing to users that have biometrics active, updated to the most recent version without and try to export.
This is caused by a missing MasterKey, this fix creates the missing MasterKey if necessary at export.

Code changes

  • UserVerificationService.cs: Calling method GetOrDeriveMasterKeyAsync to ensure that the MasterKey if doesn't exist is created. In case of success, use the same logic from MasterPasswordRepromptService to update the MasterKey and the UserKey
  • CryptoService.cs: Created a method that updates the MasterKey and the UserKey based on the code from MasterPasswordRepromptService so that it can be reused by UserVerificationService
  • MasterPasswordRepromptService: Replacing the code by the new created method from CryptoService

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2808 **Author:** [@aj-rosado](https://github.com/aj-rosado) **Created:** 10/2/2023 **Status:** ✅ Merged **Merged:** 10/3/2023 **Merged by:** [@aj-rosado](https://github.com/aj-rosado) **Base:** `master` ← **Head:** `bugfix/PM-4081-export-crash` --- ### 📝 Commits (1) - [`306b233`](https://github.com/bitwarden/android/commit/306b23358f7b496a2804a8b0c19d42215e692f9a) Added GetOrDeriveMasterKey to UserVerificationService ### 📊 Changes **4 files changed** (+16 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Services/MobilePasswordRepromptService.cs` (+1 -7) 📝 `src/Core/Abstractions/ICryptoService.cs` (+1 -0) 📝 `src/Core/Services/CryptoService.cs` (+11 -0) 📝 `src/Core/Services/UserVerificationService.cs` (+3 -1) </details> ### 📄 Description ## Type of change - [x] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective Application is crashing to users that have biometrics active, updated to the most recent version without and try to export. This is caused by a missing `MasterKey`, this fix creates the missing `MasterKey` if necessary at export. ## Code changes * **UserVerificationService.cs:** Calling method `GetOrDeriveMasterKeyAsync` to ensure that the `MasterKey` if doesn't exist is created. In case of success, use the same logic from `MasterPasswordRepromptService` to update the `MasterKey` and the `UserKey` * **CryptoService.cs:** Created a method that updates the `MasterKey` and the `UserKey` based on the code from `MasterPasswordRepromptService` so that it can be reused by `UserVerificationService` * **MasterPasswordRepromptService:** Replacing the code by the new created method from `CryptoService` ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-11 02:32:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#9962