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: patch authentication controller sign out validation #28847

Closed

Conversation

Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Dec 2, 2024

Description

This adds a patch (fix from this PR: MetaMask/core#5013), to remove the state validation from signing out. This is because the Authentication State could be either in a weird state, or metametrics toggle does not behave and use the 'signedIn' property from authentication.

Either way, this ensures that signing out using the Authentication Controller works correctly and does not throw any errors.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3709

Manual testing steps

I have not been able to find repro-steps from this issue. However the below should still work

Onboarding

  1. Select a new or existing wallet
  2. Enable metametrics
  3. Continue onboarding - EXPECTED: should succeed without issues

Settings page

  1. Navigate to settings > advanced
  2. Toggle metametrics on/off - EXPECTED: should see the switch enable/disable without errors.

Screenshots/Recordings

Before

After

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

github-actions bot commented Dec 2, 2024

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.

…tfix/patch-authentication-signout-validation
Copy link

socket-security bot commented Dec 2, 2024

Copy link

socket-security bot commented Dec 2, 2024

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
New author npm/[email protected] 🚫

View full report↗︎

Next steps

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@metamaskbot
Copy link
Collaborator

Builds ready [da1ccd4]
Page Load Metrics (1737 ± 78 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15032144174316479
domContentLoaded14972088170415474
load15022102173716278
domInteractive23133412713
backgroundConnect772342211
firstReactRender145627147
getState47103742110
initialActions01000
loadScripts11061681130614268
setupStore65512116
uiStartup17602440196717685
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: -27 Bytes (-0.00%)

@Prithpal-Sooriya Prithpal-Sooriya marked this pull request as ready for review December 3, 2024 14:16
@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner December 3, 2024 14:16
@@ -332,7 +332,7 @@
"@metamask/post-message-stream": "^8.0.0",
"@metamask/ppom-validator": "0.35.1",
"@metamask/preinstalled-example-snap": "^0.2.0",
"@metamask/profile-sync-controller": "^2.0.0",
"@metamask/profile-sync-controller": "patch:@metamask/profile-sync-controller@npm%3A2.0.0#~/.yarn/patches/@metamask-profile-sync-controller-npm-2.0.0-02e028ab48.patch",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Patched until profile-sync-controller changes are released.

The next upgrade of this package has an interdependency with the network controller.

@Prithpal-Sooriya
Copy link
Contributor Author

Closing this as @mathieuartu fix is more ideal than package patching.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants