Skip to content

Commit

Permalink
Merge pull request #335 from cortex/zeroize_secrets
Browse files Browse the repository at this point in the history
fix secret/password bug
  • Loading branch information
alexanderkjall committed Feb 9, 2024
2 parents 3022067 + bac8f4c commit 6fead23
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cursive/src/main.rs
Expand Up @@ -170,8 +170,7 @@ fn copy_first_line(ui: &mut Cursive, store: PasswordStoreType) {
return;
}
if let Err(err) = || -> pass::Result<()> {
//Wait, isn't this supposed to be a call to password()?
let mut secret = sel.unwrap().secret(&*store.lock()?.lock()?)?;
let mut secret = sel.unwrap().password(&*store.lock()?.lock()?)?;
helpers::set_clipboard(&secret)?;
secret.zeroize();
Ok(())
Expand All @@ -185,7 +184,9 @@ fn copy_first_line(ui: &mut Cursive, store: PasswordStoreType) {
helpers::set_clipboard(&String::new()).unwrap();
});
ui.call_on_name("status_bar", |l: &mut TextView| {
l.set_content(CATALOG.gettext("Copied password to copy buffer for 40 seconds"));
l.set_content(
CATALOG.gettext("Copied first line of password to copy buffer for 40 seconds"),
);
});
}

Expand Down

0 comments on commit 6fead23

Please sign in to comment.