MetaMask / MetaMask/metamask-extension

[Bug]: SRP - Extra SRP fields are added when inputting invalid chars like `ñ` or `´` because the affected words are split

Open
#35,238 2 comments 0 reactions 0 assignees View on GitHub
regression-prod-13.1.0 regression-RC-13.12.2 seedless-onboarding Sev2-normal type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Describe the bug

Whenever I paste a 12 word SRP which contains special chars like `ñ` or `´` , I see how the words are split and then I get more words (ie 15 words).

### Expected behavior

We shouldn't allow this in the first place. We should flag the user that we don't support multilingual SRPs or those special chars, instead of breaking the words down

Relates to:

https://github.com/MetaMask/metamask-extension/issues/4837
https://github.com/MetaMask/metamask-extension/issues/27563

### Screenshots/Recordings

https://github.com/user-attachments/assets/2e587b5d-bb0e-4f23-b343-63e105934004

### Steps to reproduce

1. Click Add Account
2. Click Add SRP
3. Paste this mnemonic `tajo espuma bruto asumir preso modelo novato rábano punto vagar señor comida`
4. See 15 fields appear, and the affected words are split -- no error message in the UI

### Error messages or log output

```shell

```

### Detection stage

In production (default)

### Version

13.1.0

### Build type

None

### Browser

Chrome

### Operating system

Linux

### Hardware wallet

_No response_

### Additional context

_No response_

### Severity

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue through Add Account > Add SRP using the mnemonic in the report, then trace the SRP input handling and validation entry points. Done means unsupported characters are rejected with a clear UI error and the input does not split into extra fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.