diff --git a/crates/app/src/routes/api/v1/auth/profile.rs b/crates/app/src/routes/api/v1/auth/profile.rs index aec31ef..c5bbcc1 100644 --- a/crates/app/src/routes/api/v1/auth/profile.rs +++ b/crates/app/src/routes/api/v1/auth/profile.rs @@ -144,6 +144,14 @@ pub async fn update_user_settings_request( return Json(Error::DataTooLong("warning".to_string()).into()); } + if req.mail_signature.len() > 2048 { + return Json(Error::DataTooLong("mail signature".to_string()).into()); + } + + if req.forum_signature.len() > 2048 { + return Json(Error::DataTooLong("forum signature".to_string()).into()); + } + // check percentage themes if !req.theme_sat.is_empty() && !req.theme_sat.ends_with("%") { req.theme_sat = format!("{}%", req.theme_sat)