From 46e26b9b5c5e02576edd0aeb4757b10610a83b61 Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Wed, 26 Jun 2024 14:58:34 +0200 Subject: [PATCH] Clear password in memory --- .../src/routes/popup/settings/settings-passphrase.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/extension/src/routes/popup/settings/settings-passphrase.tsx b/apps/extension/src/routes/popup/settings/settings-passphrase.tsx index 1ec91663..e90b9354 100644 --- a/apps/extension/src/routes/popup/settings/settings-passphrase.tsx +++ b/apps/extension/src/routes/popup/settings/settings-passphrase.tsx @@ -17,11 +17,12 @@ export const SettingsPassphrase = () => { const [enteredIncorrect, setEnteredIncorrect] = useState(false); const [phrase, setPhrase] = useState([]); - const sumbit = (e: React.FormEvent) => { + const submit = (e: React.FormEvent) => { e.preventDefault(); void (async function () { if (await isPassword(password)) { + setPassword(''); // Clearing so plaintext password does not hangout in memory setPhrase(await getSeedPhrase()); } else { setEnteredIncorrect(true); @@ -31,7 +32,7 @@ export const SettingsPassphrase = () => { return ( -
+

If you change browser or switch to another computer, you will need this recovery