diff --git a/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java b/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java index bb38e9b0b..92e407553 100644 --- a/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java +++ b/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java @@ -58,7 +58,7 @@ public class ChangePasswordCommand implements CommandExecutor { m.send(player, "password_error"); return true; } - if (!args[1].matches(Settings.getPassRegex)) { + if (lowpass.equalsIgnoreCase(name)) { m.send(player, "password_error"); return true; } diff --git a/src/main/java/fr/xephi/authme/process/register/AsyncronousRegister.java b/src/main/java/fr/xephi/authme/process/register/AsyncronousRegister.java index db719b99b..748be51e2 100644 --- a/src/main/java/fr/xephi/authme/process/register/AsyncronousRegister.java +++ b/src/main/java/fr/xephi/authme/process/register/AsyncronousRegister.java @@ -52,12 +52,7 @@ public class AsyncronousRegister { allowRegister = false; } - else if (!password.matches(Settings.getPassRegex)) { - m.send(player, "password_error"); - allowRegister = false; - } - - else if ((lowpass.contains("delete") || lowpass.contains("where") || lowpass.contains("insert") || lowpass.contains("modify") || lowpass.contains("from") || lowpass.contains("select") || lowpass.contains(";") || lowpass.contains("null")) || !lowpass.matches(Settings.getPassRegex)) { + else if ((lowpass.equalsIgnoreCase(player.getName()) || lowpass.contains("delete") || lowpass.contains("where") || lowpass.contains("insert") || lowpass.contains("modify") || lowpass.contains("from") || lowpass.contains("select") || lowpass.contains(";") || lowpass.contains("null")) || !lowpass.matches(Settings.getPassRegex)) { m.send(player, "password_error"); allowRegister = false; }