From 402cd2f0a659a129784dc7b40bff41bb52ad7129 Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Wed, 26 Jun 2024 15:08:37 +0200 Subject: [PATCH] Clear password in memory (#63) --- .../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