Находим код в:
com\l2jserver\loginserver\LoginController.java
rset.close();
statement.close();
// if account doesnt exists
if (expected == null)
{
if (Config.AUTO_CREATE_ACCOUNTS)
{
if ((user.length() >= 2) && (user.length() <= 14))
{
statement = con.prepareStatement("INSERT INTO accounts (login,password,lastactive,accessLevel,lastIP) values(?,?,?,?,?)");
statement.setString(1, user);
statement.setString(2, Base64.encodeBytes(hash));
statement.setLong(3, System.currentTimeMillis());
Code: Java
заменяем примерно на:
rset.close();
statement.close();
// if account doesnt exists
if (expected == null)
{
if (Config.AUTO_CREATE_ACCOUNTS && user.matches("[a-zA-Z0-9]{1,16}"))
{
if ((user.length() >= 2) && (user.length() <= 14))
{
statement = con.prepareStatement("INSERT INTO accounts (login,password,lastactive,accessLevel,lastIP) values(?,?,?,?,?)");
statement.setString(1, user);
statement.setString(2, Base64.encodeBytes(hash));
statement.setLong(3, System.currentTimeMillis());
Code: Java
Ключевое проверка логина регуляркой:
user.matches("[a-zA-Z0-9]{1,16}")
Code: Java