[PM-33122] Propogate Cipher field decryption errors#818
Merged
Conversation
Contributor
|
Great job! No new security vulnerabilities introduced in this pull request |
Contributor
🔍 SDK Breaking Change Detection ResultsSDK Version:
Breaking change detection completed. View SDK workflow |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #818 +/- ##
==========================================
+ Coverage 82.81% 82.85% +0.04%
==========================================
Files 351 351
Lines 42066 42096 +30
==========================================
+ Hits 34836 34878 +42
+ Misses 7230 7218 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
shane-melton
approved these changes
Mar 26, 2026
bw-ghapp Bot
pushed a commit
to bitwarden/sdk-swift
that referenced
this pull request
Mar 26, 2026
…ate Cipher field decryption errors (bitwarden/sdk-internal#818)
nikwithak
added a commit
that referenced
this pull request
Mar 30, 2026
This reverts commit 73cc150.
nikwithak
added a commit
that referenced
this pull request
Apr 2, 2026
## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-33122 ## 📔 Objective #818 introduced strict cipher decryption, to propogate decryption errors instead of swallowing them. This PR reverts those changes and puts them behind a feature flag. It does this in two parts: * Introduces a new struct `StrictDecrypt<T>(T)`, as a wrapper for adding a second implementation of `Decryptable` * In all calls to decrypt a cipher from the `CiphersClient`, gates that call in a feature flag check. If the flag is enabled, decrypts ciphers using the `StrictDecrypt` implementation instead of the old implementation.
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-33122
📔 Objective
When individual fields fail to decrypt on a Cipher, the fields are cleared out and the errors are swallowed. This means the user never knows that their ciphers are failing, and they could lose data if they edit the cipher, which will overwrite the bad data (which could still be recoverable).
This change propogates any decryption errors instead of swallowing them.