Fix min title char count for post titles. Fixes #1854

post_title_char_count
Dessalines 2021-11-22 14:20:09 -05:00
parent 86b2901e8c
commit 778c86af04
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ pub fn is_valid_matrix_id(matrix_id: &str) -> bool {
}
pub fn is_valid_post_title(title: &str) -> bool {
VALID_POST_TITLE_REGEX.is_match(title)
VALID_POST_TITLE_REGEX.is_match(title) && title.chars().count() >= 3 && !title.contains('\n')
}
pub fn get_ip(conn_info: &ConnectionInfo) -> IpAddr {