Skip to content

Conversation

@seaona
Copy link
Member

@seaona seaona commented Aug 14, 2025

  • fix: sanitize sensitive email from state logs

Description

This PR ensures that user's email is removed from the state logs.

Changelog

CHANGELOG entry: tbd

Related issues

Fixes: no issue logged so far

Manual testing steps

  1. Open extension settings.
  2. Go to "Advanced" and click "Download state logs".
  3. Check whether login email is have been redacted.
Screenshot 2025-08-14 at 10 19 14 PM

Screenshots/Recordings

Before

After

Pre-merge author checklist

Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).

  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see [labeling

guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors.

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.

Description

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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.

- fix: sanitize sensitive email from state logs
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR ensures that user's email is removed from the state logs.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: tbd

## **Related issues**

Fixes: no issue logged so far

## **Manual testing steps**

1. Open extension settings.
2. Go to "Advanced" and click "Download state logs".
3. Check whether login email is have been redacted.

<img width="734" height="215" alt="Screenshot 2025-08-14 at 10 19 14 PM"
src="https://github.com/user-attachments/assets/d882737e-244a-4949-9c2d-80aa5f0dd84f"
/>

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding

Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling

guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.
@github-actions
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.

@metamaskbot metamaskbot added the team-qa QA team label Aug 14, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [bd5fa8c]
UI Startup Metrics (1184 ± 61 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1184107013846112271285
load100888211596110491106
domContentLoaded99987511376210401100
domInteractive17134251734
firstPaint649130114840410221092
backgroundConnect2182022438222234
firstReactRender19143342027
getState12489141327
initialActions2013228
loadScripts78966892962828895
setupStore74172811
WebpackHomeuiStartup22351650260419023262569
load16851204197315917581910
domContentLoaded16781198195815817531900
domInteractive181283151570
firstPaint1666742064186308
backgroundConnect2913334323151
firstReactRender19389397103232393
getState3443157911280
initialActions7227427610
loadScripts16741195194715617501889
setupStore216302511325
FirefoxBrowserifyHomeuiStartup13191121179912613711572
load112697914028511861302
domContentLoaded112697914018511851302
domInteractive993428046103228
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect291691143160
firstReactRender24205782452
getState726311533
initialActions6017124215
loadScripts110696413878411671285
setupStore11317120736
WebpackHomeuiStartup15411327195413916271793
load12911112165711413641505
domContentLoaded12911112165611413631505
domInteractive983026750100244
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect292084103245
firstReactRender504011285259
getState837210834
initialActions5018719213
loadScripts12701092163711313411483
setupStore9411512824
Benchmark value 219 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 2 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 234 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 8 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2236 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 34 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 8 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 2569 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 71 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 393 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 280 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 10 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 6 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 228 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 33 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 15 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 36 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 29 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 50 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 244 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 59 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 34 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 13 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 290ms | Sum of p95 exceeds: 636.8ms
Sum of all benchmark exceeds: 926.8ms

Copy link
Member

@Gudahtt Gudahtt 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
Contributor

@gauthierpetetin gauthierpetetin left a comment

Choose a reason for hiding this comment

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

LGTM

@gauthierpetetin gauthierpetetin merged commit 49f2ab7 into Version-v13.1.0 Aug 14, 2025
144 checks passed
@gauthierpetetin gauthierpetetin deleted the cp-mail-sanitize branch August 14, 2025 20:22
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2025
@metamaskbot metamaskbot added the release-13.1.0 Issue or pull request that will be included in release 13.1.0 label Aug 19, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-13.1.0 on PR, as PR was added to branch 13.1.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.1.0 Issue or pull request that will be included in release 13.1.0 team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants