aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel GarcĂ­a <[email protected]>2020-06-07 19:53:47 +0200
committerGitHub <[email protected]>2020-06-07 19:53:47 +0200
commit52ed8e4d7591a53b8b5445a27a2c30a00fb28074 (patch)
tree1222268669e7517bded96836e6b335938c679ac7
parentdb53511855146330fe251334dd769678074b31ff (diff)
parent24c914799dc9cb711b4def0c00e99943437c69fe (diff)
downloadvaultwarden-1.15.1.tar.gz
vaultwarden-1.15.1.zip
Merge pull request #1026 from BlackDex/issue-10221.15.1
Fixes #1022 cloning with attachments
-rw-r--r--src/api/core/ciphers.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs
index 93e06781..3eac10b8 100644
--- a/src/api/core/ciphers.rs
+++ b/src/api/core/ciphers.rs
@@ -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);