add: signature character limits
This commit is contained in:
parent
1f545a0b21
commit
12fa80c7c0
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue