mojira.dev
MC-41034

SRV Records do not strip trailing .

When using SRV records, Minecraft Client sends the FQDN to the server, including the trailing period.

For example:

>>> dig +short SRV _minecraft._tcp.smp1.emc.gs
10 5 25565 playsmp1.emc.gs.

The server receives "playsmp1.emc.gs."

Client also will read the value with the trailing ., so mods that store files with the server name uses the extra period, and the server will also see the period when doing things based on the hostname.

This should be resolved so that SRV records and A records behave the same.

Comments 4

So where is the bug and how do you reproduce it?

I added some debug code that prints the name of the host sent from the client upon connection using the BungeeCord software:

@EventHandler
public void onLogin(final LoginEvent event) {
System.out.println(event.getConnection().getVirtualHost().getHostString());
}

This shows the trailing .

However connecting directly without the SRV record entry, shows no .

18:08:40 [INFO] play.emc.gs
18:08:40 [INFO] [Aikar] <-> ServerConnector [smp3] has connected
18:08:44 [INFO] play.emc.gs.
18:08:44 [INFO] [archer530] <-> ServerConnector [smp8] has connected

Is this causing any major problems with vanilla minecraft? Because if I understand it correctly, it only causes problems with mods, which are not officially supported.

Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Aikar

(Unassigned)

Unconfirmed

Minecraft 1.6.4, Minecraft 1.7.2, Minecraft 13w48b

Retrieved