-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-16098] Improved cipher decryption error handling #12468
[PM-16098] Improved cipher decryption error handling #12468
Conversation
…ing to view/edit a corrupted cipher
…en attempting to view/edit a corrupted cipher
…en attempting to view a corrupted cipher. Remove edit/clone context menu options and footer actions.
New Issues
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #12468 +/- ##
==========================================
- Coverage 34.28% 34.27% -0.01%
==========================================
Files 2901 2902 +1
Lines 89696 89798 +102
Branches 16846 16864 +18
==========================================
+ Hits 30754 30780 +26
- Misses 56523 56599 +76
Partials 2419 2419 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screen recordings LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I'm not sure whether this is something that this PR needs to ensure, or a follow-up task that key-management has to do (cc @jlf0dev), but re-encrypting incorrectly decrypted items needs to be prevented. (We should block rotation entirely while there are failed ciphers). |
…n when a decryption failure is present
…g dialog within the Vault
… cipher in trash and disable the restore option
30223cb
Also tweaked the Trash items in the Browser extension to behave similarly to the Vault - They show the error dialog upon clicking a corrupted item and only show the "delete forever" option in the 3dot menu. Screen.Recording.2024-12-19.at.3.50.26.PM.movcc: @danielleflinn |
Nice, thank you! Another potential issue (I did not investigate, just want to point it out): Line 72 in 0619ef5
If I understand this PR correctly, the above would still graph the failed ciphers, and export them, so we would have an export with failed ciphers, that then get re-imported as "good" ciphers. Would it be an option to make the interfaces for failed ciphers and good ciphers completely separated, and explicit, so that there is no confusion and no accidental oversights? |
@quexten Another great point and I like the idea of creating separate interfaces for successfully decrypted and failed to decrypt ciphers. I went ahead and updated I also left the added logic to throw an exception if a user attempts a key rotation with corrupted ciphers in their vault. As for exporting, that will now only export ciphers that were successfully decrypted. Thanks for the feedback and suggestion! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks cleaner 👍🏼
…tions when navigating away from the individual vault
023bb47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good
🎟️ Tracking
PM-16098
📔 Objective
Improve error handling when we unexpectedly fail to decrypt a cipher to avoid crashing the entire vault.
decryptionFailure
flag to theCipherView
that will be set when decryption fails along with setting the cipher name to[error: cannot decrypt]
.📸 Screenshots
Web
Screen.Recording.2024-12-18.at.12.18.03.PM.mov
Browser
Screen.Recording.2024-12-18.at.12.22.16.PM.mov
Desktop
Screen.Recording.2024-12-18.at.12.02.29.PM.mov
⏰ Reminders before review
🦮 Reviewer guidelines
:+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