ackwell / ninjabot

Ninjabot is not 'Just Another Bot'
10 stars 8 forks source link

regex: sanitise newlines #83

Closed auscompgeek closed 10 years ago

auscompgeek commented 10 years ago

So... it seems I managed to do this:

auscompgeek | s/.*/\r\nJOIN 0/
SuchNCSSBot | auscompgeek meant to say: 
        <-- | SuchNCSSBot (~ninjabot@unaffiliated/auscompgeek/bot/aucgbot) has left

... and now I have to restart it. Oops.

A join trigger would help as well.

ackwell commented 10 years ago

Mmn, we really need to sanitize that regex. Perhaps it would be a better idea to to a higher-level newline cull in the bot itself? When it's sending out the message, that is. Could leave an option available for a plugin to explicitly request that it not be sanitised.

cyphar commented 10 years ago

Wow... We need to fix irc_send to not allow for \r\n terminators in the given input (and do other sanitisation).

auscompgeek commented 10 years ago

@cyphar Not \r\n, but \n, since most IRCds allow for sending just \n rather than \r\n. But yes.