Stefan Melmuk
9 months ago
No known key found for this signature in database
GPG Key ID: 817020C608FE9C09
1 changed files with
4 additions and
0 deletions
-
src/api/core/ciphers.rs
|
|
@ -287,6 +287,10 @@ 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
|
|
|
|