aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-05-28 03:12:09 -0400
committerJesse Luehrs <doy@tozt.net>2020-05-28 03:19:45 -0400
commit3ab2da1595da8b1b596f256a26c9e65ab35bc24c (patch)
tree5400a00a8c341582a7d93f9d06bce732f9c81d39 /src/actions.rs
parent3efe6a2b304c0c63bd2ce86adcd23a3647634008 (diff)
downloadrbw-3ab2da1595da8b1b596f256a26c9e65ab35bc24c.tar.gz
rbw-3ab2da1595da8b1b596f256a26c9e65ab35bc24c.zip
display the server's error message for incorrect password
Diffstat (limited to 'src/actions.rs')
-rw-r--r--src/actions.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/actions.rs b/src/actions.rs
index c63191f..f77378e 100644
--- a/src/actions.rs
+++ b/src/actions.rs
@@ -52,7 +52,11 @@ pub async fn unlock(
crate::cipherstring::CipherString::new(protected_key)?;
let key = match protected_key.decrypt_locked_symmetric(&identity.keys) {
Ok(master_keys) => crate::locked::Keys::new(master_keys),
- Err(Error::InvalidMac) => return Err(Error::IncorrectPassword),
+ Err(Error::InvalidMac) => {
+ return Err(Error::IncorrectPassword {
+ message: "Password is incorrect. Try again.".to_string(),
+ })
+ }
Err(e) => return Err(e),
};