Skip to content

Commit

Permalink
Merge pull request #1026 from BlackDex/issue-1022
Browse files Browse the repository at this point in the history
Fixes #1022 cloning with attachments
  • Loading branch information
dani-garcia authored Jun 7, 2020
2 parents db53511 + 24c9147 commit 52ed8e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/core/ciphers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ pub fn update_cipher_from_data(
};

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);
Expand Down

0 comments on commit 52ed8e4

Please sign in to comment.