Always specify Locale on toLowerCase and toUpperCase usages, fixes AuthMe not working correctly on machines with turkish locale. ('I'.toLowerCase() => 'ı')
This commit is contained in:
@@ -15,6 +15,7 @@ import fr.xephi.authme.util.Utils;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Async task to add an email to an account.
|
||||
@@ -48,7 +49,7 @@ public class AsyncAddEmail implements AsynchronousProcess {
|
||||
* @param email the email to add
|
||||
*/
|
||||
public void addEmail(Player player, String email) {
|
||||
String playerName = player.getName().toLowerCase();
|
||||
String playerName = player.getName().toLowerCase(Locale.ROOT);
|
||||
|
||||
if (playerCache.isAuthenticated(playerName)) {
|
||||
PlayerAuth auth = playerCache.getAuth(playerName);
|
||||
|
||||
Reference in New Issue
Block a user