fix: mark all notifications as read/unread
fix: check profile status, warning, and biography length fix: check post warning and tags length
This commit is contained in:
parent
3f6f1eda9f
commit
013bc0b45f
4 changed files with 54 additions and 8 deletions
|
@ -105,6 +105,18 @@ pub async fn update_user_settings_request(
|
|||
return Json(Error::DataTooLong("display name".to_string()).into());
|
||||
}
|
||||
|
||||
if req.warning.len() > 2048 {
|
||||
return Json(Error::DataTooLong("warning".to_string()).into());
|
||||
}
|
||||
|
||||
if req.status.len() > 256 {
|
||||
return Json(Error::DataTooLong("status".to_string()).into());
|
||||
}
|
||||
|
||||
if req.biography.len() > 4096 {
|
||||
return Json(Error::DataTooLong("warning".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