Skip to content
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

Ps/pm-8003/handle-dekstop-invalidated-message-encryption #9181

Merged

Conversation

MGibson1
Copy link
Member

Handling of this error is to require the user to retry, so the promise needs to resolve.

Type of change

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

Objective

Desktop is capable of providing biometrically locked user keys while it itself is locked. However, process reloads are common in this state and this breaks the shared encryption key for native messaging. This PR implements better handling of this state ("invalidateEncryption" response) by recognizing this is an end-of-message-chain event and resolving any awaited responses as failures.

Before you submit

  • 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
  • Ensure that all UI additions follow WCAG AA requirements

Handling of this error is to require the user to retry, so the promise needs to resolve.
@MGibson1 MGibson1 requested a review from a team as a code owner May 14, 2024 20:46
@MGibson1 MGibson1 requested a review from dani-garcia May 14, 2024 20:46
@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label May 14, 2024
Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 27.79%. Comparing base (3eeafc0) to head (d6c0642).

Files Patch % Lines
...owser/src/background/nativeMessaging.background.ts 0.00% 2 Missing ⚠️
...p/src/platform/services/electron-crypto.service.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9181      +/-   ##
==========================================
- Coverage   27.79%   27.79%   -0.01%     
==========================================
  Files        2422     2422              
  Lines       70262    70264       +2     
  Branches    13101    13103       +2     
==========================================
  Hits        19531    19531              
- Misses      49211    49213       +2     
  Partials     1520     1520              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Detailsdb1348b3-03ad-44af-82bd-800518b36651

No New Or Fixed Issues Found

@MGibson1 MGibson1 removed the needs-qa Marks a PR as requiring QA approval label May 14, 2024
@MGibson1 MGibson1 enabled auto-merge (squash) May 14, 2024 21:38
@MGibson1 MGibson1 merged commit 426bacf into main May 15, 2024
42 of 43 checks passed
@MGibson1 MGibson1 deleted the ps/pm-8003/handle-dekstop-invalidated-message-encryption branch May 15, 2024 14:45
justindbaur pushed a commit that referenced this pull request May 15, 2024
* Do not initialize symmetric crypto keys with null

* Require new message on invalid native message encryption

Handling of this error is to require the user to retry, so the promise needs to resolve.
@justindbaur justindbaur mentioned this pull request May 15, 2024
justindbaur added a commit that referenced this pull request May 15, 2024
* Do not initialize symmetric crypto keys with null

* Require new message on invalid native message encryption

Handling of this error is to require the user to retry, so the promise needs to resolve.

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
justindbaur added a commit that referenced this pull request May 15, 2024
* Do not initialize symmetric crypto keys with null

* Require new message on invalid native message encryption

Handling of this error is to require the user to retry, so the promise needs to resolve.

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants