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

Missing the definition of host field in the message source #168

Open
jprjr opened this issue Feb 25, 2022 · 0 comments
Open

Missing the definition of host field in the message source #168

jprjr opened this issue Feb 25, 2022 · 0 comments

Comments

@jprjr
Copy link

jprjr commented Feb 25, 2022

Hi there, I noticed that RFC2812 specifies that the host portion of the source (formerly prefix) should be hostname, ipv4 address, or ipv6 address, I've copied the relevant parts here from RFC2812 as a reference:

prefix     =  servername / ( nickname [ [ "!" user ] "@" host ] )
host       =  hostname / hostaddr
hostname   =  shortname *( "." shortname )
shortname  =  ( letter / digit ) *( letter / digit / "-" ) *( letter / digit )
ip4addr    =  1*3digit "." 1*3digit "." 1*3digit "." 1*3digit
ip6addr    =  1*hexdigit 7( ":" 1*hexdigit )
ip6addr    =/ "0:0:0:0:0:" ( "0" / "FFFF" ) ":" ip4addr

However, a lot of IRC servers in the wild support "masking" the host portion, so the client will receive lines like:

:jprjr!~jprjr@user/jprjr JOIN #someroom

This doesn't validate, since that / character isn't allowed in a hostname.

Currently, the Modern IRC docs does not specify what values are allowed in the host portion of a source

@jprjr jprjr changed the title Update the definition of host field in the message source Missing the definition of host field in the message source Feb 25, 2022
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
@progval @jprjr and others