From 3df25410efd2ae7a1adc325c5f0ea0ab3cb6fe3d Mon Sep 17 00:00:00 2001 From: ColdDev <79663199+ColdDev@users.noreply.github.com> Date: Thu, 28 Jul 2022 23:28:50 +0000 Subject: [PATCH] Fix critical bug in Bungee auth system --- .../src/main/java/net/md_5/bungee/eaglercraft/AuthSystem.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eaglercraftbungee/src/main/java/net/md_5/bungee/eaglercraft/AuthSystem.java b/eaglercraftbungee/src/main/java/net/md_5/bungee/eaglercraft/AuthSystem.java index d143cd4..de2fc01 100644 --- a/eaglercraftbungee/src/main/java/net/md_5/bungee/eaglercraft/AuthSystem.java +++ b/eaglercraftbungee/src/main/java/net/md_5/bungee/eaglercraft/AuthSystem.java @@ -51,6 +51,7 @@ public class AuthSystem { private final Map database = new HashMap<>(); public boolean register(String username, String password, String ip) { + username = username.toLowerCase(); synchronized (database) { AuthData authData = database.get(username); if (authData != null) @@ -66,12 +67,14 @@ public class AuthSystem { } public boolean isRegistered(String username) { + username = username.toLowerCase(); synchronized (database) { return database.containsKey(username); } } public boolean changePass(String username, String password) { + username = username.toLowerCase(); synchronized (database) { AuthData authData = database.get(username); authData.salt = createSalt(16); @@ -82,6 +85,7 @@ public class AuthSystem { } public boolean login(String username, String password) { + username = username.toLowerCase(); synchronized (database) { AuthData authData = database.get(username); if (authData == null)