-
Notifications
You must be signed in to change notification settings - Fork 86
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
Malformed command when '.' in source field #835
Comments
I did a bit more digging. The issue is that halloy parses source and expects a User or a Server. the source The User parsing allows a '.' but only if there is also a username + host portion. For example, this test passes: (
":foo.bar!foo@localhost JOIN #bar\r\n",
Message {
tags: vec![],
source: Some(Source::User(User {
nickname: "foo.bar".into(),
username: Some("foo".into()),
hostname: Some("localhost".into()),
})),
command: Command::JOIN("#bar".to_string(), None),
},
), And likewise, when I modify my server to send a username and host when there is a '.' in the there is no more error in the log. However, halloy still doesn't allow the client to join the channel[0]. There are comments in the code about a workaround for matrix bridges which have both I don't know where in the codebase to go next to find out why that channel isn't showing up, but I'm guessing there is some "split on [0]: By allow, I mean show the channel in the channel list. Everything according to server logs and client logs show that the JOIN was successful, it's just the channel doesn't appear in the sidebar. |
From what I'm familiar with (e.g. IRCdocs) the prefix of a JOIN command should be a username, in which a dot character is forbidden. Those expectations are probably the proximate cause of why things are weird, as you've discovered. (This is not to say Halloy can't change to be more accommodating in this regard, just trying to provide context.) I haven't worked through the implications of your suggested workaround yet, but a suggestion re: your channel issue: the JOIN messages received are compared to what Halloy thinks your nickname is in order to distinguish between JOIN messages for other clients and JOIN messages for itself (see the match for |
Yes, I was heavily relying on the |
To add to that, I've generally considered the interpretation of |
Apologies, I think I may have been unclear previously: I did not intend the references above to be a statement of "this is wrong/unworkable (so we won't support it)". I was trying to explain the viewpoint I think that parsing code is coming from, in the hopes that it would be helpful to your efforts. (In particular, that we'll need to make sure those same assumptions are not relied upon elsewhere.) Even if IRCdocs did state that a nickname a Is there a public instance of your server that can be used for testing? |
Thanks for the clarification! I sent you details on IRC for logging into an instance for testing. |
Issue
If a server sends a command like:
Halloy will log an error:
If the '.' is removed from the nick, the command succeeds, ie
Will succeed
I assume this is not a bug in the message parsing of the source param...server names often have a '.' in them, so possibly it's higher up the stack in nick resolution or something? I've only just started poking around the codebase.
The text was updated successfully, but these errors were encountered: