]> arthur.barton.de Git - ngircd-alex.git/commit
Better validate MODE +k & +l parameters and return errors
authorAlexander Barton <alex@barton.de>
Mon, 2 Jan 2023 21:32:16 +0000 (22:32 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 2 Jan 2023 21:32:16 +0000 (22:32 +0100)
commit8e9c789ae188f8b73cc6f776a3ead21f0dfd4ca6
tree35a25858309bf164f9bfa3b22a7a6cb1dab896ec
parent3c9c54989ed20f4ed69ce6390430c01a1b0ce314
Better validate MODE +k & +l parameters and return errors

Implement new numeric ERR_INVALIDMODEPARAM_MSG(696) and:

- Reject channel keys with spaces and return ERR_INVALIDMODEPARAM_MSG;
  This was possible until now and resulted in garbled IRC commands later.
- Reject empty channel keys and return ERR_INVALIDMODEPARAM_MSG;
  This was possible until now and resulted in garbled IRC commands later.
- Return ERR_INVALIDMODEPARAM_MSG when user limit is out of bounds;
  This was silently ignored until now.

Closes #290. Thanks Val Lorentz for reporting it!
src/ngircd/irc-mode.c
src/ngircd/messages.h