Browse Source

Fix bug where secureNotes is empty (#4730)

pull/4737/head
Coby Geralnik 6 months ago
committed by GitHub
parent
commit
a4ab014ade
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      src/db/models/cipher.rs

6
src/db/models/cipher.rs

@ -189,9 +189,11 @@ impl Cipher {
} }
} }
// Fix secure note issues when data is `{}` // Fix secure note issues when data is invalid
// This breaks at least the native mobile clients // This breaks at least the native mobile clients
if self.atype == 2 && (self.data.eq("{}") || self.data.to_ascii_lowercase().eq("{\"type\":null}")) { if self.atype == 2
&& (self.data.is_empty() || self.data.eq("{}") || self.data.to_ascii_lowercase().eq("{\"type\":null}"))
{
type_data_json = json!({"type": 0}); type_data_json = json!({"type": 0});
} }

Loading…
Cancel
Save