[PR #3238] [CLOSED] [PM-2572] Add new cipher encryption on attachments without key when moving cipher to an org #52327

Closed
opened 2026-05-01 16:16:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3238
Author: @LRNcardozoWDF
Created: 5/13/2024
Status: Closed

Base: mainHead: vault/pm-2572


📝 Commits (10+)

  • 9026dd1 [PM-3593] Fix enable biometric on autofill when there is not MP (#2717)
  • 5961a00 [PM-3551] Expired SSO token cached (#2718)
  • b0f1dd0 Autosync the updated translations (#2751)
  • 382eee2 [PM-3556] Change anonaddy to addy io (#2711)
  • 3e2005e [PM-3606] TDE user with 2FA isn't able to autofill on iOS (#2723)
  • efd1671 Autosync the updated translations (#2771)
  • b932824 Make dept-development-mobile default code owner (#2780)
  • a6f0533 [PM-3393] Excessive Invalid Biometric unlock attempts should automatically log out TDE users (#2747)
  • 11922c6 [PM-3522] Keep variable value after logout. (#2761)
  • 43bf0fb [PM-3086] Account switcher endpoint use domain string for Bitwarden production environments (#2773)

📄 Description

Type of change

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

Objective

When an attachment file gets reencrypted and reuploaded, the new key is ignored by the server. This PR prepares the fix for the mobile side by adding the cipher.key in the attachment's metadata.

Code changes

  • Attachment.cs AttachmentView.cs: Added property CipherKey to store the cipher.Key
  • src/Core/Models/Domain/Cipher.cs: Added logic to use attachment.CipherKey for decryption if necessary
  • src/Core/Services/CipherService.cs: Update the cipher to use cipher.Key and save that value in the attachment object and metadata.

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/3238 **Author:** [@LRNcardozoWDF](https://github.com/LRNcardozoWDF) **Created:** 5/13/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `vault/pm-2572` --- ### 📝 Commits (10+) - [`9026dd1`](https://github.com/bitwarden/android/commit/9026dd10e5f6659203266e14a721018363801454) [PM-3593] Fix enable biometric on autofill when there is not MP (#2717) - [`5961a00`](https://github.com/bitwarden/android/commit/5961a001ab7df88790d7c6681da44225b5a63f6f) [PM-3551] Expired SSO token cached (#2718) - [`b0f1dd0`](https://github.com/bitwarden/android/commit/b0f1dd00eebd8c6640367ab7c711b89ff0c810ee) Autosync the updated translations (#2751) - [`382eee2`](https://github.com/bitwarden/android/commit/382eee2ed36fcabbafc69dd279333cffb163bafc) [PM-3556] Change anonaddy to addy io (#2711) - [`3e2005e`](https://github.com/bitwarden/android/commit/3e2005e5ed918ebedc856e331fb5674e18881fbe) [PM-3606] TDE user with 2FA isn't able to autofill on iOS (#2723) - [`efd1671`](https://github.com/bitwarden/android/commit/efd1671f489186e529ed9ff199b99c74b7bb9a21) Autosync the updated translations (#2771) - [`b932824`](https://github.com/bitwarden/android/commit/b932824b5a809558dc25179d19f800d3c06325dd) Make dept-development-mobile default code owner (#2780) - [`a6f0533`](https://github.com/bitwarden/android/commit/a6f05338c266e8453f5558d598e055ad2ad1b779) [PM-3393] Excessive Invalid Biometric unlock attempts should automatically log out TDE users (#2747) - [`11922c6`](https://github.com/bitwarden/android/commit/11922c6f4926ec3f9e644b1476ba356ed69f98e7) [PM-3522] Keep variable value after logout. (#2761) - [`43bf0fb`](https://github.com/bitwarden/android/commit/43bf0fbdb382179089c80e231b240f361ccecfdd) [PM-3086] Account switcher endpoint use domain string for Bitwarden production environments (#2773) ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> When an attachment file gets reencrypted and reuploaded, the new key is ignored by the server. This PR prepares the fix for the mobile side by adding the cipher.key in the attachment's metadata. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **Attachment.cs AttachmentView.cs:** Added property CipherKey to store the cipher.Key * **src/Core/Models/Domain/Cipher.cs:** Added logic to use attachment.CipherKey for decryption if necessary * **src/Core/Services/CipherService.cs:** Update the cipher to use cipher.Key and save that value in the attachment object and metadata. ## 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-05-01 16:16:45 -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#52327