mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 01:00:18 +01: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();
|
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");
|
m.send(player, "password_error");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if ((lowpass.equalsIgnoreCase(name){
|
||||||
|
m.send(player, "password_error_nick");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (lowpass.length() < Settings.getPasswordMinLen || lowpass.length() > Settings.passwordMaxLength) {
|
if (lowpass.length() < Settings.getPasswordMinLen || lowpass.length() > Settings.passwordMaxLength) {
|
||||||
m.send(player, "pass_len");
|
m.send(player, "pass_len");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!Settings.unsafePasswords.isEmpty()) {
|
if (!Settings.unsafePasswords.isEmpty()) {
|
||||||
if (Settings.unsafePasswords.contains(lowpass)) {
|
if (Settings.unsafePasswords.contains(lowpass)) {
|
||||||
m.send(player, "password_error");
|
m.send(player, "password_error_unsafe");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user