diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index 2fa6260a..7ee256ef 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -233,6 +233,11 @@ impl Cipher { d.into_iter() .filter_map(|d| match d.data.get("password") { Some(p) if p.is_string() => Some(d.data), + Some(_) => { + let mut data = d.data; + data["password"] = json!(""); + Some(data) + } _ => None, }) .map(|mut d| { @@ -280,6 +285,14 @@ impl Cipher { if let Some(pw_revision) = type_data_json["passwordRevisionDate"].as_str() { type_data_json["passwordRevisionDate"] = json!(validate_and_format_date(pw_revision)); } + + // SDK 0.2.0 compatibility: Bitwarden extension v2026.7.0 expects these fields + if type_data_json.get("autofillOnPageLoad").is_none() { + type_data_json["autofillOnPageLoad"] = Value::Null; + } + if type_data_json.get("fido2Credentials").is_none() { + type_data_json["fido2Credentials"] = Value::Array(Vec::new()); + } } // Fix secure note issues when data is invalid