diff --git a/libs/hbb_common/src/password_security.rs b/libs/hbb_common/src/password_security.rs index ddfe28baa..5aca2c85a 100644 --- a/libs/hbb_common/src/password_security.rs +++ b/libs/hbb_common/src/password_security.rs @@ -149,7 +149,7 @@ pub fn decrypt_vec_or_original(v: &[u8], current_version: &str) -> (Vec, boo } fn encrypt(v: &[u8]) -> Result { - if !v.is_empty() { + if !v.is_empty() && v.len() <= 128 { symmetric_crypt(v, true).map(|v| base64::encode(v, base64::Variant::Original)) } else { Err(())