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:
Gabriele C
2022-08-20 04:41:04 +02:00
parent c38e2aba28
commit 75b3a571e1
67 changed files with 217 additions and 143 deletions
@@ -32,6 +32,8 @@ import org.bukkit.potion.PotionEffectType;
import javax.inject.Inject;
import java.util.Locale;
import static fr.xephi.authme.service.BukkitService.TICKS_PER_SECOND;
import static fr.xephi.authme.settings.properties.RestrictionSettings.PROTECT_INVENTORY_BEFORE_LOGIN;
@@ -90,7 +92,7 @@ public class AsynchronousJoin implements AsynchronousProcess {
* @param player the player to process
*/
public void processJoin(Player player) {
String name = player.getName().toLowerCase();
String name = player.getName().toLowerCase(Locale.ROOT);
String ip = PlayerUtils.getPlayerIp(player);
if (!validationService.fulfillsNameRestrictions(player)) {