mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Fix dangling sout
This commit is contained in:
parent
3007bdc020
commit
3e0a36dbbd
1 changed files with 4 additions and 3 deletions
|
@ -31,10 +31,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
String[] split = packethandshakinginsetprotocol.hostname.split("\00");
|
String[] split = packethandshakinginsetprotocol.hostname.split("\00");
|
||||||
if ( split.length == 3 || split.length == 4 ) {
|
if ( split.length == 3 || split.length == 4 ) {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (!BYPASS_HOSTCHECK && !validate(split[0])) {
|
+ if (!BYPASS_HOSTCHECK && !validate(split[1])) {
|
||||||
+ final ChatMessage message = new ChatMessage("Invalid hostname");
|
+ final ChatMessage message = new ChatMessage("Invalid hostname");
|
||||||
+ this.c.sendPacket(new PacketLoginOutDisconnect(message));
|
+ this.getNetworkManager().sendPacket(new PacketLoginOutDisconnect(message));
|
||||||
+ this.c.close(message);
|
+ this.getNetworkManager().close(message);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
@ -51,4 +51,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ //noinspection UnstableApiUsage
|
+ //noinspection UnstableApiUsage
|
||||||
+ return InetAddresses.isUriInetAddress(hostname);
|
+ return InetAddresses.isUriInetAddress(hostname);
|
||||||
+ }
|
+ }
|
||||||
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue