View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006665 | unreal | ircd | public | 2026-11-15 01:50 | 2026-11-15 01:50 |
| Reporter | gh0st | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 6.2.7.1 | ||||
| Summary | 0006665: MODE line split ignores sender prefix (initial_len unused): lines can exceed 512 bytes, last param cut | ||||
| Description | In src/modules/mode.c, make_mode_str() computes initial_len (the length of the "nick!user@host MODE #chan " prefix) but never uses it. The check that decides when to start a new MODE line only counts modes + parameters: if ((strlen(m->modeline[curr]) + strlen(m->paramline[curr]) + strlen(&pvar[cnt][2])) > 507) So with a long nick/ident/host plus long parameters, the line sent to local clients goes past 512 bytes and the last parameter gets truncated. The server's own channel state is correct, but clients see a different ban mask (or nick) than what was actually set, so client-side channel state drifts from the server. | ||||
| Steps To Reproduce | 1. Connect with a long nick, long ident and a long (e.g. 60+ char) vhost. 2. Op yourself in a channel and set several long ban masks in a single MODE, e.g. MODE #test +bbbbbb <six ~70-char masks>. 3. Look at the raw line received by another local client in the channel: it is longer than 512 bytes and the final ban mask is cut off, while /MODE #test b on the server shows the full mask. | ||||
| Additional Information | A fix that works for us (tested, including with long hosts): count the prefix in the split check, and raise MAXMULTILINEMODES from 3 to 12 so the extra split lines don't hit the 'avalanche' limit: if (*m->paramline[curr] && (initial_len + strlen(m->modeline[curr]) + strlen(m->paramline[curr]) + strlen(&pvar[cnt][2])) > 507) (the *m->paramline[curr] guard avoids starting an empty line when the first parameter alone is long.) Reported by gh0st ([email protected]). | ||||
| 3rd party modules | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-15 01:50 | gh0st | New Issue |