mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 04:38:03 +02:00
Update ChangePasswordCommand.java
This commit is contained in:
parent
729e74b155
commit
d222b2cbd4
@ -54,17 +54,21 @@ public class ChangePasswordCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
String lowpass = args[1].toLowerCase();
|
||||
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) || lowpass.equalsIgnoreCase(name)) {
|
||||
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) {
|
||||
m.send(player, "password_error");
|
||||
return true;
|
||||
}
|
||||
if ((lowpass.equalsIgnoreCase(name){
|
||||
m.send(player, "password_error_nick");
|
||||
return true;
|
||||
}
|
||||
if (lowpass.length() < Settings.getPasswordMinLen || lowpass.length() > Settings.passwordMaxLength) {
|
||||
m.send(player, "pass_len");
|
||||
return true;
|
||||
}
|
||||
if (!Settings.unsafePasswords.isEmpty()) {
|
||||
if (Settings.unsafePasswords.contains(lowpass)) {
|
||||
m.send(player, "password_error");
|
||||
m.send(player, "password_error_unsafe");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user