You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's unclear how equivalent IPv6 addresses, like :: and 0:0:0:0:0:0:0:0 for example, should be treated. Should they be normalized or not? Should they compare equal or not? I assume the answer to both of these questions is "no", similar to how DNS names must be treated case-sensitively.
IPv4
The requirements on the format of IPv4 addresses given are:
IPv4 literals must be a sequence of four decimal numbers in the range 0 to 255, separated by ..
— some prose below the grammar
Does this mean IPv4 addresses with leading zeros, like 000.000.000.000 for example, should be accepted? The grammar permits it, and the prose doesn't really say. If so, this raises the same pair of questions as above (and I assume their answers would be the same).
(At least the possibility of leading zeros indicating the rest of the number should be interpreted as octal is eliminated by the prose. Also, for example, the Rust standard library refuses to parse IPv4 addresses with leading zeros, citing RFC 6943.)
Solutions
Add clarifications to the spec clear up the ambiguities.
The text was updated successfully, but these errors were encountered:
CobaltCause
added
the
clarification
An area where the expected behaviour is understood, but the spec could do with being more explicit
label
Mar 5, 2025
The answer to your first question is "yes, @user:[::] is a different person from @user:[0:0:0:0:0:0:0:0]". Contributions to the spec clarifying this would be welcome.
The answer to the second part is less clear, but since Python and Rust both reject leading zeros in IPv4 literals, I think it's fair to conclude that they are not permitted in a valid server name. Again, contributions to clarify this welcome.
I think it's fair to conclude that they are not permitted in a valid server name.
To be clear, is 000.000.000.000 an invalid server name, or an invalid IPv4 literal server name? I would assume that a server name like 000.000.000.000 must be treated as a valid DNS name server name.
Problem area: https://spec.matrix.org/v1.13/appendices/#server-name
Issues
IPv6
It's unclear how equivalent IPv6 addresses, like
::
and0:0:0:0:0:0:0:0
for example, should be treated. Should they be normalized or not? Should they compare equal or not? I assume the answer to both of these questions is "no", similar to how DNS names must be treated case-sensitively.IPv4
The requirements on the format of IPv4 addresses given are:
— the grammar
— some prose below the grammar
Does this mean IPv4 addresses with leading zeros, like
000.000.000.000
for example, should be accepted? The grammar permits it, and the prose doesn't really say. If so, this raises the same pair of questions as above (and I assume their answers would be the same).(At least the possibility of leading zeros indicating the rest of the number should be interpreted as octal is eliminated by the prose. Also, for example, the Rust standard library refuses to parse IPv4 addresses with leading zeros, citing RFC 6943.)
Solutions
The text was updated successfully, but these errors were encountered: