protocol: read CASEMAPPING from CAPAB and verify it matches echos ascii identity folding, warning on mismatch instead of silently desyncing
All checks were successful
CI / check (push) Successful in 4m31s

This commit is contained in:
Jean Chevronnet 2026-07-18 01:58:49 +00:00
parent e206f4edbb
commit 0ca06247f8
No known key found for this signature in database
3 changed files with 29 additions and 0 deletions

View file

@ -1116,6 +1116,16 @@ impl Engine {
self.db.set_live_chanmodes(modes);
Vec::new()
}
NetEvent::Casemapping { name } => {
// echo folds identifiers as ascii. Verify the ircd agrees, rather than
// assuming it silently — a mismatch would desync account/channel identity.
if name.eq_ignore_ascii_case("ascii") {
tracing::info!(casemapping = %name, "ircd casemapping matches echo (ascii)");
} else {
tracing::warn!(casemapping = %name, "ircd CASEMAPPING is not ascii — echo compares identifiers as ascii, so nicks/channels differing only by rfc1459-equivalent characters may be mismatched; keep the ircd on CASEMAPPING=ascii");
}
Vec::new()
}
NetEvent::UserConnect { uid, nick, host, ip } => {
let arriving_nick = nick.clone();
self.network.user_connect(uid.clone(), nick, host, ip.clone());