diff options
| author | Nakidai <nakidai@disroot.org> | 2026-02-01 20:41:03 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-02-01 20:41:03 +0300 |
| commit | 724205c1bc157b8933b1c63ec37014c2f07842ae (patch) | |
| tree | 72095dd58e091e2d849e8b36ac14af7b4df82aa8 /reply.c | |
| parent | e50f850d763e3b1e6b06b4b312512a5b006eabbc (diff) | |
| download | libreircd-724205c1bc157b8933b1c63ec37014c2f07842ae.tar.gz libreircd-724205c1bc157b8933b1c63ec37014c2f07842ae.zip | |
Add validation
Now there can't be single \r or \n in the message, erroneous nicks and channel names are rejected, and usernames are stripped on '@'
Diffstat (limited to 'reply.c')
| -rw-r--r-- | reply.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/reply.c b/reply.c index 5da4094..c8d526b 100644 --- a/reply.c +++ b/reply.c @@ -130,6 +130,12 @@ vreply(const struct Peer *peer, int number, va_list ap) hostname, getnick(peer) ), _); + REPLY(432, WRITE( + ":%s 432 %s %s :Erroneous nickname", + hostname, + getnick(peer), + nick + ), nick, _); REPLY(433, WRITE( ":%s 433 %s %s :Nickname is already in use", hostname, |