Skip to content

Commit

Permalink
remove overzealous sanity check (#4879)
Browse files Browse the repository at this point in the history
when cloning an item from an organization to the personal vault
the client sends the collection id of the cloned item
  • Loading branch information
stefan0xC authored Aug 21, 2024
1 parent cbdb565 commit aaab7f9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/api/core/ciphers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aaab7f9

Please sign in to comment.