From 3c420f85f69771db269c015ead8e1678a4ad6899 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Fri, 2 Feb 2024 14:35:30 +0000 Subject: 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. --- atuin-client/src/history/store.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'atuin-client/src') 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::(&self.encryption_key); - - let decrypted = match decrypted { - Ok(d) => d, - Err(e) => { - println!("failed to decrypt history: {e}"); - continue; - } - }; + let decrypted = record.decrypt::(&self.encryption_key)?; HistoryRecord::deserialize(&decrypted.data, HISTORY_VERSION) } -- cgit v1.3.1