Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide test vectors for IRCv3.2 message format changes #104

Open
kaniini opened this issue Dec 14, 2014 · 11 comments
Open

Please provide test vectors for IRCv3.2 message format changes #104

kaniini opened this issue Dec 14, 2014 · 11 comments
Labels

Comments

@kaniini
Copy link
Contributor

kaniini commented Dec 14, 2014

The topic says it all, would be nice to have test vectors that are 'officially' valid, and ones which are officially 'invalid' so we can test for conformance in the parser.

@clokep
Copy link
Contributor

clokep commented Dec 15, 2014

This would be useful, using this in a test suite for emitting messages is probably more useful. You'll likely want to ensure you can parse the 'invalid' messages anyway (if you believe in "be strict in what you send, but generous in what you receive", at least).

I've collected some 'conformant' and busted messages over the past few years that I've seen in the wild (or had reported to me in bugs): http://dxr.mozilla.org/comm-central/source/chat/protocols/irc/test/test_ircMessage.js Hopefully it's useful to someone. (In particular I find some busted ones from Unreal interesting.) These pretty much deal with server-client messages, not sure if that's what you're after or not.

@grawity
Copy link
Contributor

grawity commented Dec 15, 2014

I have some at https://github.com/grawity/hacks/tree/master/irc/parsers/tests for testing my own IRC parsers. Though I will need to update them a bit; I've recently realized that test-irc-split is not particularly useful; but some of them might be interesting anyway.

(@clokep What kind of 'unescaping' can create newlines inside a message?)

@clokep
Copy link
Contributor

clokep commented Dec 15, 2014

@grawity Seems to be referring to the CTCP "Low Level Quoting" (that's what CTCP document calls it, at least). I...don't seem to have any tests for how this is handled in the CTCP parsing, and I don't know if I've ever seen a client actually send text like that besides Instantbird/Thunderbird (and I believe we no longer send any messages like that).

@dwfreed
Copy link

dwfreed commented Dec 15, 2014

I've yet to see a client that actually does the quoting and unquoting specified in the CTCP "spec." (ChatZilla, the more common extension for Mozilla software, does not, afaik). It's not a great idea.

@kythyria
Copy link
Contributor

@clokep That document technically permits >1 CTCP message per PRIVMSG. I don't think I've ever seen that happen either.

@clokep
Copy link
Contributor

clokep commented Dec 15, 2014

Yes, it does allow that. I think we all know that the CTCP protocol is not entirely sane. I wrote code that tries to parse weird messages, but as I said we don't send them (back to my "be strict in what you send, but generous in what you receive" tenant).

I've never seen them in the wild that I've noticed. (Nor have I seen quoted \r or \n either...as far as I know.) Anyway, I think this request is worth a discussion and we should try to avoid getting distracted by the craziness of CTCP here.

@SadieCat
Copy link
Contributor

Has anyone been working on this?

@SadieCat
Copy link
Contributor

@grawity Do you think it would be would be possible for you to extract your tests to a separate repository (ircv3/test-vectors?) and convert them to a standard format (e.g. YAML, JSON, etc) that they can be consumed easily?

@DanielOaks
Copy link
Member

I've started working on something like this over here, along with a little script to test them in the repo.

@Mikaela
Copy link
Contributor

Mikaela commented Sep 13, 2015

Does this issue include SASL REAUTH looks interesting, but I have no idea how to test it and I am too lazy to setup my own IRCd and services?

@kaniini
Copy link
Contributor Author

kaniini commented Sep 13, 2015

No.

@jwheare jwheare added the Meta label Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants