From 77d005513f9a547129fee7c8760eff0bac30bd3c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 3 May 2020 20:55:48 -0400 Subject: fix editing organization entries --- src/bin/rbw/commands.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/bin/rbw/commands.rs') diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index ab0fd21..fa4cc39 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -643,10 +643,17 @@ pub fn edit(name: &str, username: Option<&str>) -> anyhow::Result<()> { let (password, notes) = parse_editor(&contents); let password = password - .map(|password| crate::actions::encrypt(&password, None)) + .map(|password| { + crate::actions::encrypt( + &password, + entry.org_id.as_deref(), + ) + }) .transpose()?; let notes = notes - .map(|notes| crate::actions::encrypt(¬es, None)) + .map(|notes| { + crate::actions::encrypt(¬es, entry.org_id.as_deref()) + }) .transpose()?; let mut history = entry.history.clone(); let (entry_username, entry_password) = match &entry.data { @@ -680,6 +687,7 @@ pub fn edit(name: &str, username: Option<&str>) -> anyhow::Result<()> { &access_token, &refresh_token, &entry.id, + entry.org_id.as_deref(), &entry.name, &data, notes.as_deref(), -- cgit v1.2.3-54-g00ecf