aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-05-28 02:44:18 -0400
committerJesse Luehrs <doy@tozt.net>2020-05-28 02:46:58 -0400
commit3efe6a2b304c0c63bd2ce86adcd23a3647634008 (patch)
treeb4a2e36f299b8f2ebcf3946ee1d9d870549a9685 /src/bin
parent46d1e9aa0221dca2051bad8f2e0b1bd37bea9b04 (diff)
downloadrbw-3efe6a2b304c0c63bd2ce86adcd23a3647634008.tar.gz
rbw-3efe6a2b304c0c63bd2ce86adcd23a3647634008.zip
properly handle empty string from pinentry
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/rbw-agent/actions.rs4
1 files changed, 3 insertions, 1 deletions
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");