diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2024-02-02 14:35:30 +0000 |
---|---|---|
committer | Ellie Huxtable <ellie@elliehuxtable.com> | 2024-02-02 18:01:09 +0000 |
commit | 3c420f85f69771db269c015ead8e1678a4ad6899 (patch) | |
tree | b2bc794d650e52d48244443a999c82fa07308cd3 | |
parent | 754f17ddb4969973b9332a5324af42886e503c0f (diff) |
feat: failure to decrypt history = failure to sync
Now that the user can purge their store and _do something_ about invalid
records, we should not tolerate mixed key records in store.
-rw-r--r-- | atuin-client/src/history/store.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/atuin-client/src/history/store.rs b/atuin-client/src/history/store.rs index 0a2a2312..c09c7573 100644 --- a/atuin-client/src/history/store.rs +++ b/atuin-client/src/history/store.rs @@ -164,15 +164,7 @@ impl HistoryStore { for record in records.into_iter() { let hist = match record.version.as_str() { HISTORY_VERSION => { - let decrypted = record.decrypt::<PASETO_V4>(&self.encryption_key); - - let decrypted = match decrypted { - Ok(d) => d, - Err(e) => { - println!("failed to decrypt history: {e}"); - continue; - } - }; + let decrypted = record.decrypt::<PASETO_V4>(&self.encryption_key)?; HistoryRecord::deserialize(&decrypted.data, HISTORY_VERSION) } |