Wallet recovery phrase security fixes (#2276)

* prompt for recovery phrase using linefeed crate functionality
* break out recovery parse function, remove phrase from logging
This commit is contained in:
Yeastplume
2019-01-02 20:10:07 +00:00
committed by Ignotus Peverell
parent f88ffe5fd6
commit d9ff8e278e
7 changed files with 161 additions and 38 deletions
+1 -5
View File
@@ -87,11 +87,7 @@ pub fn recover(config: &WalletConfig, args: RecoverArgs) -> Result<(), Error> {
&args.passphrase,
);
if let Err(e) = res {
error!(
"Error recovering seed with list '{}' - {}",
&args.recovery_phrase.as_ref().unwrap(),
e
);
error!("Error recovering seed - {}", e);
return Err(e);
}
}
+1 -7
View File
@@ -49,13 +49,7 @@ where
// just read the wallet here, no need for a write lock
let mut outputs = wallet
.iter()
.filter(|out| {
if show_spent {
true
} else {
out.status != OutputStatus::Spent
}
})
.filter(|out| show_spent || out.status != OutputStatus::Spent)
.collect::<Vec<_>>();
// only include outputs with a given tx_id if provided