From bb5389e577fa128a0d3563eb0bed486fc950f8a2 Mon Sep 17 00:00:00 2001 From: jholdstock Date: Tue, 14 Apr 2026 17:29:19 +0800 Subject: [PATCH] Fully sanitize wallet name of invalid chars. When a new wallet name has been provided by the user, every instance of invalid characters should be removed from the name, not just the first. --- app/components/views/GetStartedPage/PreCreateWallet/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/views/GetStartedPage/PreCreateWallet/hooks.js b/app/components/views/GetStartedPage/PreCreateWallet/hooks.js index 30cd8fa93b..e416374259 100644 --- a/app/components/views/GetStartedPage/PreCreateWallet/hooks.js +++ b/app/components/views/GetStartedPage/PreCreateWallet/hooks.js @@ -64,7 +64,7 @@ export const usePreCreateWallet = ({ // Filesystem related chars: /\.: // Escaped when stored in dcrwallet.conf ini files: ;#[] // Specially handled by dcrwallet: $%~ - const replaceNameChars = /[/\\.:;#[\]$%~]/; + const replaceNameChars = /[/\\.:;#[\]$%~]/g; newWalletName = newWalletName.replace(replaceNameChars, ""); // Remove leading spaces. if (newWalletName.length > 0 && newWalletName[0] === " ")