summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Melmuk <[email protected]>2024-08-21 21:54:13 +0200
committerGitHub <[email protected]>2024-08-21 21:54:13 +0200
commitaaab7f96404726fe8791668d15c5e654138da5d6 (patch)
tree980a30c458cda4e27c6f45c1489a0161c378a270
parentcbdb5657f1bd234a98972df5c11e0492f10f08a8 (diff)
downloadvaultwarden-aaab7f96404726fe8791668d15c5e654138da5d6.tar.gz
vaultwarden-aaab7f96404726fe8791668d15c5e654138da5d6.zip
remove overzealous sanity check (#4879)
when cloning an item from an organization to the personal vault the client sends the collection id of the cloned item
-rw-r--r--src/api/core/ciphers.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs
index 7907cd76..6fcde07c 100644
--- a/src/api/core/ciphers.rs
+++ b/src/api/core/ciphers.rs
@@ -287,10 +287,6 @@ async fn post_ciphers_create(
if data.cipher.organization_id.is_some() && data.collection_ids.is_empty() {
err!("You must select at least one collection.");
}
- // reverse sanity check to prevent corruptions
- if !data.collection_ids.is_empty() && data.cipher.organization_id.is_none() {
- err!("The client has not provided an organization id!");
- }
// This check is usually only needed in update_cipher_from_data(), but we
// need it here as well to avoid creating an empty cipher in the call to