geforkt von mirrored/vaultwarden
Make sure the data field is always returned, otherwise the mobile apps seem to have issues
Dieser Commit ist enthalten in:
Ursprung
5471088e93
Commit
adf47827c9
1 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen
|
@ -80,7 +80,19 @@ impl Cipher {
|
||||||
let fields_json = self.fields.as_ref().and_then(|s| serde_json::from_str(s).ok()).unwrap_or(Value::Null);
|
let fields_json = self.fields.as_ref().and_then(|s| serde_json::from_str(s).ok()).unwrap_or(Value::Null);
|
||||||
let password_history_json = self.password_history.as_ref().and_then(|s| serde_json::from_str(s).ok()).unwrap_or(Value::Null);
|
let password_history_json = self.password_history.as_ref().and_then(|s| serde_json::from_str(s).ok()).unwrap_or(Value::Null);
|
||||||
|
|
||||||
let mut data_json: Value = serde_json::from_str(&self.data).unwrap_or(Value::Null);
|
// Get the data or a default empty value to avoid issues with the mobile apps
|
||||||
|
let mut data_json: Value = serde_json::from_str(&self.data).unwrap_or_else(|_| json!({
|
||||||
|
"Fields":null,
|
||||||
|
"Name": self.name,
|
||||||
|
"Notes":null,
|
||||||
|
"Password":null,
|
||||||
|
"PasswordHistory":null,
|
||||||
|
"PasswordRevisionDate":null,
|
||||||
|
"Response":null,
|
||||||
|
"Totp":null,
|
||||||
|
"Uris":null,
|
||||||
|
"Username":null
|
||||||
|
}));
|
||||||
|
|
||||||
// TODO: ******* Backwards compat start **********
|
// TODO: ******* Backwards compat start **********
|
||||||
// To remove backwards compatibility, just remove this entire section
|
// To remove backwards compatibility, just remove this entire section
|
||||||
|
|
Laden …
In neuem Issue referenzieren