geforkt von mirrored/vaultwarden
Fixes #1022 cloning with attachments
When a cipher has one or more attachments it wasn't able to be cloned. This commit fixes that issue.
Dieser Commit ist enthalten in:
Ursprung
db53511855
Commit
24c914799d
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
|
@ -274,7 +274,10 @@ pub fn update_cipher_from_data(
|
||||||
};
|
};
|
||||||
|
|
||||||
if saved_att.cipher_uuid != cipher.uuid {
|
if saved_att.cipher_uuid != cipher.uuid {
|
||||||
err!("Attachment is not owned by the cipher")
|
// Warn and break here since cloning ciphers provides attachment data but will not be cloned.
|
||||||
|
// If we error out here it will break the whole cloning and causes empty ciphers to appear.
|
||||||
|
warn!("Attachment is not owned by the cipher");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
saved_att.akey = Some(attachment.Key);
|
saved_att.akey = Some(attachment.Key);
|
||||||
|
|
Laden …
In neuem Issue referenzieren