-
Notifications
You must be signed in to change notification settings - Fork 15
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
IRC protocol bug with colon escaping of last argument #17
Comments
To clarify the initial modes should be "+nt". the timestamp is misparsed, and the final channel mode should be "+kl aa:bb 999" in that example. (":" in the channel key is also valid as long as it doesn't appear as the first character of the key, even though many servers strip :'s from the key completely, the RFC allows this - I did the test this way to further exercise the parser). |
This was tested using v0.3.202. |
If you're using 0.3.202 you're using my fork of hydra IRC which no longer exists, i stopped releasing it and deleted the repo due to lack of time for development. It doesn't implement a lot of newer IRC features and has some bugs that never got fixed. I advice against using it. |
@gdwnldsKSC do you fancy tackling this issue? |
Definitely will take a look, had quite a lengthy vacation recently :) Looks understandable enough. |
@hydra got a fix in |
HydraIRC is not properly implementing the IRC spec in regards to escaping, which is causing some problems on servers with non-historical but perfectly valid (per the RFC) behavior in message tokenization.
The issue is that properly stripping the colon escaping is not always done on the last argument - while most servers do not escape the final string unless it contains spaces, a string containing no spaces may still be escaped and is valid.
You can verify the broken parsing behavior on testnet.inspircd.org for example, but this is affecting many newer servers. This is causing a lot of breakage, as you can see from the failure to parse the timestamp, and the extra ":"'s that are appearing in modes - this causes the client to desync from the server.
[11:23] *** channel #t6 mode is :+nt
[11:23] *** channel created at Wed Dec 31 17:00:00 1969
[11:23] *** testtrn sets channel #t6 mode +kl aa:bb :999
inspircd/inspircd#1636 has some additional information. This bug recently affected HexChat, AdiIRC,, irssi, and WeeChat, but those clients have all fixed their parsers. Interestingly, ircII was not affected (nor mIRC) but EPIC was (also patched in the upcoming release). The issue link above contains a link to parsing test cases, to help verify that your client is complaint to the specifications.
The text was updated successfully, but these errors were encountered: