From 3efe6a2b304c0c63bd2ce86adcd23a3647634008 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 28 May 2020 02:44:18 -0400 Subject: properly handle empty string from pinentry --- src/bin/rbw-agent/actions.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/bin') diff --git a/src/bin/rbw-agent/actions.rs b/src/bin/rbw-agent/actions.rs index d021bda..0062067 100644 --- a/src/bin/rbw-agent/actions.rs +++ b/src/bin/rbw-agent/actions.rs @@ -158,7 +158,9 @@ async fn two_factor( protected_key, )) } - Err(rbw::error::Error::IncorrectPassword) => { + Err(rbw::error::Error::IncorrectPassword) + // can get this if the user passes an empty string + | Err(rbw::error::Error::TwoFactorRequired { .. }) => { if i == 3 { return Err(rbw::error::Error::IncorrectPassword) .context("failed to log in to bitwarden instance"); -- cgit v1.2.3-54-g00ecf