From 1bc09a9c74d0d1c47d1b88b5833ad8174fc04928 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 22 May 2020 01:09:14 -0400 Subject: drop in-memory keys when changing configuration --- src/bin/rbw/commands.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index f7cd6c2..6d90010 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -325,6 +325,10 @@ pub fn config_set(key: &str, value: &str) -> anyhow::Result<()> { } config.save().context("failed to save config file")?; + // drop in-memory keys, since they will be different if the email or url + // changed + lock()?; + Ok(()) } @@ -342,6 +346,10 @@ pub fn config_unset(key: &str) -> anyhow::Result<()> { } config.save().context("failed to save config file")?; + // drop in-memory keys, since they will be different if the email or url + // changed + lock()?; + Ok(()) } -- cgit v1.2.3-54-g00ecf