echo-message triggers on bogus privmsg #911

Open
opened 2026-10-05 04:52:22 +02:00 by adam · 1 comment
Owner

While the echo-message CAP is enabled, sending a badly-formed PRIVMSG with a target but no text parameter echoes back an empty message along with whatever the server's response is.

Example:

-> PRIVMSG #chan
<- :You!Ident@Host PRIVMSG #chan :
<- :server 412 You :No text to send

Expected:

-> PRIVMSG #chan
<- :server 412 You :No text to send

ZNC 1.7.3 on archlinux x86-64.

While the echo-message CAP is enabled, sending a badly-formed PRIVMSG with a target but no text parameter echoes back an empty message along with whatever the server's response is. Example: ``` -> PRIVMSG #chan <- :You!Ident@Host PRIVMSG #chan : <- :server 412 You :No text to send ``` Expected: ``` -> PRIVMSG #chan <- :server 412 You :No text to send ``` ZNC 1.7.3 on archlinux x86-64. <!-- github-sync-id:453766769 -->
Author
Owner

With echo-message you'll also get the message back as a success, and then also the 412 error. The message will get added to the buffer to be played back to clients.

I wonder if we should make ZNC handle PRIVMSG without a message and return a 412 from ZNC itself? (thus never relay PRIVMSG to the server in this case). Does anyone see any potential problems that may arise if we do so?

C: PRIVMSG <target>
Z: :irc.znc.in 412 <nick> :No text to send
With echo-message you'll also get the message back as a success, and then also the 412 error. The message will get added to the buffer to be played back to clients. I wonder if we should make ZNC handle PRIVMSG without a message and return a 412 from ZNC itself? (thus never relay PRIVMSG to the server in this case). Does anyone see any potential problems that may arise if we do so? ``` C: PRIVMSG <target> Z: :irc.znc.in 412 <nick> :No text to send ``` <!-- github-comment-id:733858236 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#911