diff --git a/patches/server/0842-Validate-usernames.patch b/patches/server/0842-Validate-usernames.patch index f175b4e105..7575cc1a03 100644 --- a/patches/server/0842-Validate-usernames.patch +++ b/patches/server/0842-Validate-usernames.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate usernames diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 33a29890435d6065a2cc4f8e8bf8209c01d5d114..0df723378b49aecacc15400db4b5f56c87a965b3 100644 +index 33a29890435d6065a2cc4f8e8bf8209c01d5d114..96593919db8b140e55fe1a120c2835b679771e92 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -230,10 +230,38 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -21,7 +21,7 @@ index 33a29890435d6065a2cc4f8e8bf8209c01d5d114..0df723378b49aecacc15400db4b5f56c + for (int i = 0, len = in.length(); i < len; ++i) { + char c = in.charAt(i); + -+ if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_')) { ++ if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_' || c == '.')) { + continue; + } +