From 9e0b63c8716322f6502981f3713e59f2a51e919d Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 13 Aug 2022 21:46:06 +0800 Subject: [PATCH] make the "hash" arguments match the display UX values that way any entries that would show up "exactly" as the same description would flag as conflicts on re-upload --- apps/vault/src/storage.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/vault/src/storage.rs b/apps/vault/src/storage.rs index 95e4a86cf..2191f0485 100644 --- a/apps/vault/src/storage.rs +++ b/apps/vault/src/storage.rs @@ -431,7 +431,6 @@ impl StorageContent for TotpRecord { fn hash(&self) -> Vec { let mut h = ctap_crypto::sha256::Sha256::new(); - h.update(self.secret.as_bytes()); h.update(self.name.as_bytes()); h.finalize().to_vec() } @@ -659,7 +658,7 @@ impl StorageContent for PasswordRecord { fn hash(&self) -> Vec { let mut h = ctap_crypto::sha256::Sha256::new(); - h.update(self.password.as_bytes()); + h.update(self.description.as_bytes()); h.update(self.username.as_bytes()); h.finalize().to_vec() }