Check nicks on the IRC listener with the HTTP API's rule (closes #142)
check / check (push) Waiting to run
check / check (push) Waiting to run
The nick rule moves from internal/handlers to internal/service as ValidNick, and the HTTP API and both IRC listener NICK paths call it. The IRC listener used to cut a nick to 32 bytes and accept anything else, so a nick with spaces such as "bob PRIVMSG #inj :hi" made the lines built from it read as another user's PRIVMSG. It now answers a nick the rule refuses with ERR_ERRONEUSNICKNAME (432), before and after registration, and keeps the nick as it was. Model: opus-5-5
This commit is contained in:
@@ -249,9 +249,11 @@ what channel bans (`+b` mode) match against.
|
||||
hold the same nick simultaneously.
|
||||
- Nicks are **case-sensitive** (unlike traditional IRC). `Alice` and `alice` are
|
||||
different nicks.
|
||||
- Nick length: 1–32 characters. Over the HTTP API a nick starts with a letter or
|
||||
`_`, followed by letters, digits and `` _-[]\^{}|` ``. The IRC listener cuts a
|
||||
longer nick to 32 bytes and checks nothing else.
|
||||
- Nick length: 1–32 characters. A nick starts with a letter or `_`, followed by
|
||||
letters, digits and `` _-[]\^{}|` ``. The HTTP API and the IRC listener both
|
||||
apply this rule. On the IRC listener, a `NICK` with any other nick, before or
|
||||
after registration, gets ERR_ERRONEUSNICKNAME (432) and leaves the nick as it
|
||||
was.
|
||||
- Nicks are **released when a session is destroyed** (via `QUIT` command or
|
||||
session expiry). There is no nick registration or reservation system.
|
||||
- Nick changes are broadcast to all users sharing a channel with the changer, as
|
||||
|
||||
Reference in New Issue
Block a user