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

fix: password reset #25847

Merged
merged 6 commits into from
Jul 18, 2024
Merged

fix: password reset #25847

merged 6 commits into from
Jul 18, 2024

Conversation

owencraston
Copy link
Contributor

@owencraston owencraston commented Jul 16, 2024

Description

  1. What is the reason for the change?
  • This fix addresses a user facing bug in production
  • When a user locks the wallet and goes through the forget password flow, the wallet is not accessible with the new password. Instead the user must use the old password to unlock the wallet.
  • This is a bug in the keyring controller because the encryptionKey gets generated with the old password and is not reset when the user locks the wallet and generates a new password.
  1. What is the improvement/solution?
  • This fix upgrades the keyring controller to version 17.1.1 which fixes this bug by clearing the encryption key/salt when the user locks the wallet as well as when they submit their password. This ensures that the encryption key is always in sync with the latest password.
  • The keyring controller pr for this fix can be found here
  • This change involved a major version bump for the keyring controller from 16 to 17. Here is the changelog for this bump.

Open in GitHub Codespaces

Related issues

Fixes: #25696

Manual testing steps

  • Open the extension
  • Proceed to Forget password flow
  • Paste your secret recovery phrase
  • Set a new different password
  • Proceed to Restore your Wallet
  • After entering the account, lock it and try to login with the new password
  • You should be able to log in with your new password

Screenshots/Recordings

Before

Reset.wallet.Chrome.mov

After

Screen.Recording.2024-07-16.at.5.55.05.PM.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@owencraston
Copy link
Contributor Author

@metamaskbot update-policies

Copy link

socket-security bot commented Jul 16, 2024

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

View full report↗︎

@metamaskbot
Copy link
Collaborator

Policies updated

@owencraston owencraston marked this pull request as ready for review July 16, 2024 23:33
@owencraston owencraston requested review from a team as code owners July 16, 2024 23:33
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.76%. Comparing base (20f54db) to head (eb7514b).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25847   +/-   ##
========================================
  Coverage    69.76%   69.76%           
========================================
  Files         1398     1398           
  Lines        49171    49171           
  Branches     13574    13574           
========================================
  Hits         34303    34303           
  Misses       14868    14868           

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

@metamaskbot
Copy link
Collaborator

Builds ready [eb7514b]
Page Load Metrics (152 ± 179 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint79133100147
domContentLoaded11572694
load451776152373179
domInteractive11572694
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 53.27 KiB (1.62%)
  • ui: 0 Bytes (0.00%)
  • common: 299.75 KiB (4.61%)

@Gudahtt Gudahtt requested a review from mikesposito July 17, 2024 12:26
@owencraston
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

No policy changes

@owencraston
Copy link
Contributor Author

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

Copy link

sonarcloud bot commented Jul 17, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [047402c]
Page Load Metrics (164 ± 157 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint763801357737
domContentLoaded1093382110
load421575164327157
domInteractive1093382110
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 11.47 KiB (0.34%)
  • ui: 0 Bytes (0.00%)
  • common: 38.08 KiB (0.56%)

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@owencraston owencraston merged commit 15cd69d into develop Jul 18, 2024
78 of 79 checks passed
@owencraston owencraston deleted the fix/forgot-password branch July 18, 2024 10:07
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
@metamaskbot metamaskbot added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Jul 18, 2024
@mikesposito
Copy link
Member

mikesposito commented Jul 18, 2024

Unfortunately, I didn't notice that this bump breaks a peer dependency rule for @metamask/signature-controller. I opened another PR to bump @metamask/signature-controller and @metamask/user-operation-controller

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: The new password is not recognized; Metamask only accepts the old password after wallet reset
4 participants