From 5c861fe864ac46eeffc8580814638c0590316233 Mon Sep 17 00:00:00 2001 From: Wesley Wolfe Date: Mon, 2 Sep 2013 16:51:14 -0500 Subject: [PATCH] Fix improperly initialized usernames --- src/main/java/net/minecraft/server/PendingConnection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java index c9e187e661..17490596e8 100644 --- a/src/main/java/net/minecraft/server/PendingConnection.java +++ b/src/main/java/net/minecraft/server/PendingConnection.java @@ -63,6 +63,9 @@ public class PendingConnection extends Connection { public void a(Packet2Handshake packet2handshake) { // CraftBukkit start + if (this.g != null) { + this.disconnect("Invalid username " + this.g); + } this.hostname = packet2handshake.c == null ? "" : packet2handshake.c + ':' + packet2handshake.d; // CraftBukkit end this.g = packet2handshake.f();