-
Notifications
You must be signed in to change notification settings - Fork 2
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
multiline responses to CAP LS 302 are not parsed correctly #8
Comments
Looks like I misunderstood/wrongly implemented the handling and interpreted as if if should be chatlib/chatlib/src/main/java/io/mrarm/chatlib/irc/handlers/CapCommandHandler.java Lines 28 to 31 in e18ea46
|
Fixed with 579d7fe |
Note that connecting oragono.io now fails with:
and to be honest, I'm not sure if I am doing something wrong here? |
Is this on a local instance or on the testnet? If it's the testnet, try using TLS on 6697 instead; if a local instance (and you're not connecting on loopback), try adding the IP range you're connecting from to secure-nets: https://github.com/oragono/oragono/blob/0db4b42ffe178a8267fd82f3e6ffbe86ccdf2139/default.yaml#L334 |
(Ah, this is the testnet --- you need to use TLS because your account is set to always-on.) |
Okay you're right - I could connect w/o issues now. Thanks. |
By the way, one more issue I noticed is that channel list breaks, as there is no RPL_LISTSTART message sent:
|
Ah, yes. We have an open issue about it (ergochat/ergo#1335) but I haven't addressed it yet, due to my understanding that this numeric is now deprecated: |
Haven't tested, but this should work: diff --git a/chatlib/src/main/java/io/mrarm/chatlib/irc/handlers/ListCommandHandler.java b/chatlib/src/main/java/io/mrarm/chatlib/irc/handlers/ListCommandHandler.java
index f6fc420..c47c516 100644
--- a/chatlib/src/main/java/io/mrarm/chatlib/irc/handlers/ListCommandHandler.java
+++ b/chatlib/src/main/java/io/mrarm/chatlib/irc/handlers/ListCommandHandler.java
@@ -34,8 +34,11 @@ public class ListCommandHandler implements CommandDisconnectHandler {
}
if (request == null)
throw new InvalidMessageException("Channel list entry without a request context");
- if (numeric == RPL_LISTSTART) {
+ if (request.entries == null) {
request.entries = new ArrayList<>();
+ }
+ if (numeric == RPL_LISTSTART) {
+ // ignore
} else if (numeric == RPL_LISTEND) {
ChannelList resp = new ChannelList(currentRequest.entries);
request.retVal.set(resp);
@@ -43,8 +46,6 @@ public class ListCommandHandler implements CommandDisconnectHandler {
request.callback.onResponse(resp);
handleNextRequest(connection);
} else if (numeric == RPL_LIST) {
- if (request.entries == null)
- throw new InvalidMessageException("Channel list entry without a list start message");
ChannelList.Entry entry;
try {
entry = new ChannelList.Entry(CommandHandler.getParamWithCheck(params, 1), |
Okay. I opted for a different way to fix this, and this is addressed in 7025570 |
Awesome. Just checking, does that work if you receive RPL_LISTEND with no RPL_LIST before it (as you would if there were no channels)? |
Not sure how the client app handles a null list at the moment, so I corrected it so the list never is null since it's in general safer for the library to do that. |
I'm using Revolution 0.5.2 (from F-Droid) against testnet.oragono.io. I created an account
revolution
, with passwordrevolutionpassphrase
, for testing:This is a multiline reply to CAP LS 302. It looks like Revolution is only parsing the final line (
CAP * LS znc.in/self-message
), so it doesn't realize that the server supports SASL and is unable to send SASL. This causes the handshake to stall (because in our server implementation, SASL is required to claim a registered nickname).Thanks for your time!
The text was updated successfully, but these errors were encountered: