Skip to content

Commit

Permalink
Add some restrictions to custom subject text
Browse files Browse the repository at this point in the history
Restrict custom subject text from being empty and from exceeding 100 in length, otherwise restore to default.
  • Loading branch information
czy-29 committed Aug 5, 2024
1 parent 2c0971d commit 23f628f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ impl ExtraConfig {
.and_then(|qp| qp.opt())
.unwrap_or_default()
.0,
subject: extra_config.subject,
subject: extra_config
.subject
.filter(|t| t.len() <= 100 && !t.is_empty()),
path: extra_config.path,
}
}
Expand Down

0 comments on commit 23f628f

Please sign in to comment.