diff --git a/CraftBukkit-Patches/0071-Prevent-Duplicate-Handshakes.patch b/CraftBukkit-Patches/0071-Prevent-Duplicate-Handshakes.patch new file mode 100644 index 000000000..7289612e4 --- /dev/null +++ b/CraftBukkit-Patches/0071-Prevent-Duplicate-Handshakes.patch @@ -0,0 +1,21 @@ +From cd94b224bb10b79c8d8252d549066b12741c6f3e Mon Sep 17 00:00:00 2001 +From: Nathan Adams +Date: Tue, 3 Sep 2013 11:17:14 +1000 +Subject: [PATCH] Prevent Duplicate Handshakes + + +diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java +index 3aeff44..f2aa839 100644 +--- a/src/main/java/net/minecraft/server/PendingConnection.java ++++ b/src/main/java/net/minecraft/server/PendingConnection.java +@@ -68,6 +68,7 @@ public class PendingConnection extends Connection { + + private static final java.util.regex.Pattern validName = java.util.regex.Pattern.compile("^[a-zA-Z0-9_-]{2,16}$"); // Spigot + public void a(Packet2Handshake packet2handshake) { ++ if (this.g != null) { this.disconnect("Quit repeating yourself."); return; } // Spigot - Thanks Dinnerbone! + // CraftBukkit start + this.hostname = packet2handshake.c == null ? "" : packet2handshake.c + ':' + packet2handshake.d; + // CraftBukkit end +-- +1.8.1.2 +