You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PM-22812] Attachments get corrupted when downgrading from cipherkeys (#328)
## 🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-22812
<!-- Paste the link to the Jira or GitHub issue or otherwise describe /
point to where this change is coming from. -->
## 📔 Objective
Editing a cipher with attachments causes attachment corruption when
switching between cipher-key encryption and user-key encryption in
either direction. The SDK's AttachmentView was not providing the
decrypted attachment key needed for re-encryption scenarios. When the
cipher gets re-encrypted between different encryption contexts
(cipher-key ↔ user-key) during save, the client needs the decrypted
attachment key to properly re-encrypt it under the new encryption
context. Without this, null gets posted for the attachment key, breaking
decryption.
This is a temporary solution during the migration from TypeScript to the
SDK. The decrypted_key field should be removed once all encryption logic
is handled within the SDK.
Cleanup tracked in: https://bitwarden.atlassian.net/browse/PM-23005
<!-- Describe what the purpose of this PR is, for example what bug
you're fixing or new feature you're adding. -->
## ⏰ Reminders before review
- Contributor guidelines followed
- All formatters and local linters executed and passed
- Written new unit and / or integration tests where applicable
- Protected functional changes with optionality (feature flags)
- Used internationalization (i18n) for all UI strings
- CI builds passed
- Communicated to DevOps any deployment requirements
- Updated any necessary documentation (Confluence, contributing docs) or
informed the documentation
team
## 🦮 Reviewer guidelines
<!-- Suggested interactions but feel free to use (or not) as you desire!
-->
- 👍 (`:+1:`) or similar for great changes
- 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info
- ❓ (`:question:`) for questions
- 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry
that's not quite a confirmed
issue and could potentially benefit from discussion
- 🎨 (`:art:`) for suggestions / improvements
- ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or
concerns needing attention
- 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or
indications of technical debt
- ⛏ (`:pick:`) for minor or nitpick changes
0 commit comments