Skip to content

Commit

Permalink
Fix min title char count for post titles. Fixes #1854
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Nov 23, 2021
1 parent 86b2901 commit 778c86a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/utils/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 778c86a

Please sign in to comment.