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
@@ -57,7 +57,7 @@ public class CrazyLoginConverter implements Converter {
continue;
if (args[0].equalsIgnoreCase("name"))
continue;
String player = args[0];
String player = args[0].toLowerCase();
String psw = args[1];
try {
if (player != null && psw != null) {
@@ -31,7 +31,7 @@ public class RoyalAuthConverter implements Converter {
if (!file.exists())
continue;
RoyalAuthYamlReader ra = new RoyalAuthYamlReader(file);
PlayerAuth auth = new PlayerAuth(o.getName(), ra.getHash(), "127.0.0.1", ra.getLastLogin(), "your@email.com");
PlayerAuth auth = new PlayerAuth(name, ra.getHash(), "127.0.0.1", ra.getLastLogin(), "your@email.com");
data.saveAuth(auth);
} catch (Exception e) {
ConsoleLogger.showError("Error while trying to import " + o.getName() + " RoyalAuth datas");
@@ -72,7 +72,7 @@ public class newxAuthToFlat {
rs = ps.executeQuery();
if (!rs.next())
return null;
realPass = rs.getString("playername");
realPass = rs.getString("playername").toLowerCase();
} catch (SQLException e) {
xAuthLog.severe("Failed to retrieve name for account: " + id, e);
return null;
@@ -77,7 +77,7 @@ public class oldxAuthToFlat {
rs = ps.executeQuery();
if (!rs.next())
return null;
realPass = rs.getString("playername");
realPass = rs.getString("playername").toLowerCase();
} catch (SQLException e) {
xAuthLog.severe("Failed to retrieve name for account: " + id, e);
return null;
@@ -47,9 +47,9 @@ public class vAuthFileReader {
}
if (pname == null)
continue;
auth = new PlayerAuth(pname, password, "127.0.0.1", System.currentTimeMillis(), "your@email.com");
auth = new PlayerAuth(pname.toLowerCase(), password, "127.0.0.1", System.currentTimeMillis(), "your@email.com");
} else {
auth = new PlayerAuth(name, password, "127.0.0.1", System.currentTimeMillis(), "your@email.com");
auth = new PlayerAuth(name.toLowerCase(), password, "127.0.0.1", System.currentTimeMillis(), "your@email.com");
}
if (auth != null)
database.saveAuth(auth);