diff options
author | Wesley Wolfe <weswolf@aol.com> | 2012-07-26 01:17:09 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2012-07-26 01:17:09 -0500 |
commit | a4d7691299d86edc46931b3978de62a60576ba0d (patch) | |
tree | 1274fb8cf86a813e2870e19e8791529772bf1ef0 /src/main/java/net/minecraft/server/NetLoginHandler.java | |
parent | b00de5f1768e14238f8660b63eb3fd5d744fc0a9 (diff) | |
download | craftbukkit-a4d7691299d86edc46931b3978de62a60576ba0d.tar craftbukkit-a4d7691299d86edc46931b3978de62a60576ba0d.tar.gz craftbukkit-a4d7691299d86edc46931b3978de62a60576ba0d.tar.lz craftbukkit-a4d7691299d86edc46931b3978de62a60576ba0d.tar.xz craftbukkit-a4d7691299d86edc46931b3978de62a60576ba0d.zip |
Detect and disconnect 1.3 clients properly. Fixes BUKKIT-1952
Diffstat (limited to 'src/main/java/net/minecraft/server/NetLoginHandler.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetLoginHandler.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java index 436f7de4..89404afd 100644 --- a/src/main/java/net/minecraft/server/NetLoginHandler.java +++ b/src/main/java/net/minecraft/server/NetLoginHandler.java @@ -55,6 +55,12 @@ public class NetLoginHandler extends NetHandler { } public void a(Packet2Handshake packet2handshake) { + // CraftBukkit start - 1.3 detection + if (packet2handshake.a == null) { + disconnect("Outdated server!"); + return; + } + // CraftBukkit end // CraftBukkit start int i = packet2handshake.a.indexOf(';'); if (i == -1) { |