瀏覽代碼

Merge branch 'BlackDex-issue-2937'

Daniel García 2 年之前
父節點
當前提交
37d0792a7d
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/api/core/ciphers.rs

+ 6 - 0
src/api/core/ciphers.rs

@@ -366,6 +366,12 @@ pub async fn update_cipher_from_data(
         err!("Organization mismatch. Please resync the client before updating the cipher")
     }
 
+    if let Some(note) = &data.Notes {
+        if note.len() > 10_000 {
+            err!("The field Notes exceeds the maximum encrypted value length of 10000 characters.")
+        }
+    }
+
     // Check if this cipher is being transferred from a personal to an organization vault
     let transfer_cipher = cipher.organization_uuid.is_none() && data.OrganizationId.is_some();