Re-ignore case for name, Security issues T.T

This commit is contained in:
Xephi
2015-04-21 16:21:26 +02:00
parent 605a6d88c1
commit 84cf1a6627
37 changed files with 144 additions and 169 deletions
@@ -25,6 +25,7 @@ public class AsyncronousLogin {
protected Player player;
protected String name;
protected String realName;
protected String password;
protected boolean forceLogin;
private AuthMe plugin;
@@ -36,7 +37,8 @@ public class AsyncronousLogin {
AuthMe plugin, DataSource data) {
this.player = player;
this.password = password;
name = player.getName();
name = player.getName().toLowerCase();
realName = player.getName();
this.forceLogin = forceLogin;
this.plugin = plugin;
this.database = data;
@@ -124,7 +126,7 @@ public class AsyncronousLogin {
boolean passwordVerified = true;
if (!forceLogin)
try {
passwordVerified = PasswordSecurity.comparePasswordWithHash(password, hash, name);
passwordVerified = PasswordSecurity.comparePasswordWithHash(password, hash, realName);
} catch (Exception ex) {
ConsoleLogger.showError(ex.getMessage());
m._(player, "error");