Skip to content

Fix/nick truncate not reject - #21

Merged
vjan-nie merged 3 commits into
Univers42:mainfrom
vjan-nie:fix/nick-truncate-not-reject
Jul 29, 2026
Merged

Fix/nick truncate not reject#21
vjan-nie merged 3 commits into
Univers42:mainfrom
vjan-nie:fix/nick-truncate-not-reject

Conversation

@vjan-nie

Copy link
Copy Markdown
Collaborator

No description provided.

vjan-nie added 3 commits July 29, 2026 16:10
A NICK over 9 chars got 432 ERR_ERRONEUSNICKNAME, which blocked HexChat:
its fallback lengthens the nick on retry, so all attempts failed and the
client couldn't connect. Real ircds (Solanum) truncate to the advertised
NICKLEN; 432 is also semantically wrong (it's for invalid chars, not length).
Character validation still runs over the full untruncated string (invalid
char past position 9 → 432, confirmed against Solanum); truncation happens
in cmdNick before isNickInUse so two nicks truncating to the same name
collide with 433 rather than duplicating.
A client that registers, sends one line, then stays silent with the socket
fully open, timestamping recv()==0. Unlike nc (which only exits when its
stdin is EOF *and* the socket closes), this measures the server's actual
disconnect decision — the distinction that resolved the T2 false positive.
@vjan-nie
vjan-nie merged commit e7a714d into Univers42:main Jul 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant