fluffle/goirc

messages are not escaped

Closed this issue · 2 comments

currently messages are not escaped, thus
conn.Notice("asd", "I’m a troll\r\n\/quit")
will cause it to exit. If I understood the RFCs correctly \r or \n aren’t allowed except to end a message. Lines may also not exceed 512 chars including the cr-lf at the end.

None of this is currently checked. I can provide a patch, but I’m new to Go and not sure how this should be handled – i.e. silently omitting illegal characters or producing an error when invalid characters are given to one of the command functions?

This is fixed in master, perhaps try that first?

On 13 June 2013 22:48, Stefan notifications@github.com wrote:

currently messages are not escaped, thus
conn.Notice("asd", "I’m a troll\r\n/quit")
will cause it to exit. If I understood the RFCs correctly \r or \n aren’t
allowed except to end a message. Lines may also not exceed 512 chars
including the cr-lf at the end.

None of this is currently checked. I can provide a patch, but I’m new to
Go and not sure how this should be handled – i.e. silently omitting illegal
characters or producing an error when invalid characters are given to one
of the command functions?


Reply to this email directly or view it on GitHubhttps://github.com//issues/36
.

oh, I foolishly didn’t check that I actually was on the master branch. Thanks for your quick reply!