Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Fix case-sensitivity for ping passthrough
Dieser Commit ist enthalten in:
Ursprung
ca52f8989e
Commit
ce26ae76c2
@ -41,6 +41,7 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@ -167,6 +168,7 @@ public class StatusSessionHandler implements MinecraftSessionHandler {
|
|||||||
return CompletableFuture.completedFuture(constructLocalPing(shownVersion));
|
return CompletableFuture.completedFuture(constructLocalPing(shownVersion));
|
||||||
} else {
|
} else {
|
||||||
String virtualHostStr = inbound.getVirtualHost().map(InetSocketAddress::getHostString)
|
String virtualHostStr = inbound.getVirtualHost().map(InetSocketAddress::getHostString)
|
||||||
|
.map(str -> str.toLowerCase(Locale.ROOT))
|
||||||
.orElse("");
|
.orElse("");
|
||||||
List<String> serversToTry = server.getConfiguration().getForcedHosts().getOrDefault(
|
List<String> serversToTry = server.getConfiguration().getForcedHosts().getOrDefault(
|
||||||
virtualHostStr, server.getConfiguration().getAttemptConnectionOrder());
|
virtualHostStr, server.getConfiguration().getAttemptConnectionOrder());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren