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

Malformed USER command on empty realname #314

Closed
Halkcyon opened this issue Apr 13, 2021 · 3 comments
Closed

Malformed USER command on empty realname #314

Halkcyon opened this issue Apr 13, 2021 · 3 comments

Comments

@Halkcyon
Copy link

https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands#USER

When attempting to connect to freenode, if the realname configuration is set to an empty string, freenode responds that USER does not have enough parameters. This is regardless of whether you are registered or SASL authentication succeeded.

I couldn't find whether this is invalid in the specification; it only calls out that names can contain spaces.

https://tools.ietf.org/html/rfc2812#section-3.1.3

pub fn user(hostname: &str, realname: &str) -> String {
format!("USER {} 8 * :{}\r\n", hostname, realname)
}

@trevarj
Copy link
Contributor

trevarj commented Apr 13, 2021

I think the realname is mandatory:

In addition to the nickname, all servers must have the following information about all clients: The real name/address of the host that the client is connecting from, the username of the client on that host, and the server to which the client is connected.

https://modern.ircdocs.horse/#clients

@Halkcyon
Copy link
Author

@trevarj if that is the case, I think it's a good idea to encode it as an error when parsing configuration to avoid invalid states?

@osa1
Copy link
Owner

osa1 commented Apr 14, 2021

Thanks for reporting. I also can't see whether realname can be empty, but apparently not. Unfortunately IRC is very poorly specified so often the answer to such questions is "whatever widely used servers do".

We also don't check for empty nicks. I guess we could add some validation to the config after parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants