Reject uid-form values as a topic setter or cooldown key (require a nick/mask)
All checks were successful
CI / check (push) Successful in 5m25s

This commit is contained in:
Jean Chevronnet 2026-07-21 09:53:04 +00:00
parent 948a59707e
commit 62b275fd01
No known key found for this signature in database
4 changed files with 35 additions and 10 deletions

View file

@ -193,7 +193,8 @@ impl Service for ChanServ {
ctx.notice(me, from.uid, t!(ctx, " Email : {email}", email = info.email));
}
ctx.notice(me, from.uid, t!(ctx, " Registered : {when}", when = echo_api::human_time(info.ts)));
if !info.topic_setter.is_empty() {
// Only a real nick/mask, never a bare uid (nicks never start with a digit).
if !info.topic_setter.is_empty() && !info.topic_setter.starts_with(|c: char| c.is_ascii_digit()) {
ctx.notice(me, from.uid, t!(ctx, " Topic by : \x02{who}\x02", who = info.topic_setter));
}
if let Some(s) = db.channel_suspension(chan) {