diff options
author | Spottedleaf <[email protected]> | 2022-01-01 11:53:46 -0800 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2022-01-01 11:53:46 -0800 |
commit | b1af5ea79f95569f55bab974b4e46188e0e18985 (patch) | |
tree | 63856a911539456bf07e707a35520be7db8154e0 | |
parent | 2a827e31abec3602dd1ed381d207a6cbb16a8afc (diff) | |
download | Paper-b1af5ea79f95569f55bab974b4e46188e0e18985.tar.gz Paper-b1af5ea79f95569f55bab974b4e46188e0e18985.zip |
Allow . in usernames
-rw-r--r-- | patches/server/0848-Validate-usernames.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0848-Validate-usernames.patch b/patches/server/0848-Validate-usernames.patch index 7b2638062d..9af73795c3 100644 --- a/patches/server/0848-Validate-usernames.patch +++ b/patches/server/0848-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 494ca8fa8c742d4eac9fb11878d3b3170d850265..446bfdf83c09025ea8af23a25c2965bf688a795b 100644 +index 494ca8fa8c742d4eac9fb11878d3b3170d850265..5c131e187397786178ae1b665c2adac2eb025e44 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -229,10 +229,38 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -21,7 +21,7 @@ index 494ca8fa8c742d4eac9fb11878d3b3170d850265..446bfdf83c09025ea8af23a25c2965bf + 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; + } + |