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

[PM-3483] Remove migrateKeyForNeverLockIfNeeded Logic #8953

Merged
merged 4 commits into from May 1, 2024

Conversation

justindbaur
Copy link
Member

@justindbaur justindbaur commented Apr 27, 2024

Type of change

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

Objective

This helps fix a bug in MV3 where you could force stop the service worker from chrome://serviceworker-internals and then when the service worker restarted we would run VaultTimeoutService.init and in doing that we'd also run migrateKeyForNeverLockIfNeeded. Since the service worker restarting doesn't mean we lose our memory storage data, my user will still have a master key in memory. This tricked CryptoService.isLegacyUser into thinking that I was a legacy user and that I should be logged out. But this user isn't a legacy user and they don't use never lock. This meant that you could reopen your popup and you would be logged out when you would have expected to be logged in still.

Likely, there is logic wrong in these checks, since it would falsely report me as legacy when I was not, but this is also logic we had marked for deletion 6 months ago.

After deleting this code I can stop the service worker and open the popup back open still logged in.

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

@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label Apr 27, 2024
@justindbaur justindbaur requested review from a team, rr-bw and MGibson1 April 27, 2024 18:48
Copy link

codecov bot commented Apr 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.73%. Comparing base (b45c309) to head (8f7beff).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8953   +/-   ##
=======================================
  Coverage   27.72%   27.73%           
=======================================
  Files        2407     2407           
  Lines       69745    69716   -29     
  Branches    12978    12971    -7     
=======================================
- Hits        19337    19335    -2     
+ Misses      48906    48879   -27     
  Partials     1502     1502           

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

This comment was marked as off-topic.

MGibson1
MGibson1 previously approved these changes Apr 27, 2024
@trmartin4 trmartin4 requested review from jlf0dev and removed request for rr-bw April 27, 2024 19:55
@justindbaur justindbaur requested a review from a team as a code owner April 27, 2024 19:56
@justindbaur justindbaur requested review from coroiu and MGibson1 and removed request for coroiu April 27, 2024 19:56
@justindbaur justindbaur removed the needs-qa Marks a PR as requiring QA approval label May 1, 2024
@justindbaur justindbaur merged commit 4b42ff7 into main May 1, 2024
62 of 63 checks passed
@justindbaur justindbaur deleted the auth/pm-3483/remove-migrate-key-if-needed branch May 1, 2024 19:50
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

3 participants