mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 12:48:03 +02:00
Remove Checks for #308
This commit is contained in:
parent
6ac51d97f5
commit
e5bd73d899
@ -27,12 +27,7 @@ public class ChangePasswordAdminCommand implements ExecutableCommand {
|
||||
|
||||
// Validate the password
|
||||
String playerPassLowerCase = playerPass.toLowerCase();
|
||||
// TODO #308: Remove this check
|
||||
if (playerPassLowerCase.contains("delete") || playerPassLowerCase.contains("where")
|
||||
|| playerPassLowerCase.contains("insert") || playerPassLowerCase.contains("modify")
|
||||
|| playerPassLowerCase.contains("from") || playerPassLowerCase.contains("select")
|
||||
|| playerPassLowerCase.contains(";") || playerPassLowerCase.contains("null")
|
||||
|| !playerPassLowerCase.matches(Settings.getPassRegex)) {
|
||||
if (!playerPassLowerCase.matches(Settings.getPassRegex)) {
|
||||
commandService.send(sender, MessageKey.PASSWORD_MATCH_ERROR);
|
||||
return;
|
||||
}
|
||||
|
@ -27,12 +27,7 @@ public class RegisterAdminCommand implements ExecutableCommand {
|
||||
final String playerPassLowerCase = playerPass.toLowerCase();
|
||||
|
||||
// Command logic
|
||||
// TODO #308: Remove the check for SQL keywords
|
||||
if (playerPassLowerCase.contains("delete") || playerPassLowerCase.contains("where")
|
||||
|| playerPassLowerCase.contains("insert") || playerPassLowerCase.contains("modify")
|
||||
|| playerPassLowerCase.contains("from") || playerPassLowerCase.contains("select")
|
||||
|| playerPassLowerCase.contains(";") || playerPassLowerCase.contains("null")
|
||||
|| !playerPassLowerCase.matches(Settings.getPassRegex)) {
|
||||
if (!playerPassLowerCase.matches(Settings.getPassRegex)) {
|
||||
commandService.send(sender, MessageKey.PASSWORD_MATCH_ERROR);
|
||||
return;
|
||||
}
|
||||
|
@ -32,12 +32,7 @@ public class ChangePasswordCommand extends PlayerCommand {
|
||||
|
||||
// Make sure the password is allowed
|
||||
String playerPassLowerCase = newPassword.toLowerCase();
|
||||
// TODO #308: Remove SQL keywords check
|
||||
if (playerPassLowerCase.contains("delete") || playerPassLowerCase.contains("where")
|
||||
|| playerPassLowerCase.contains("insert") || playerPassLowerCase.contains("modify")
|
||||
|| playerPassLowerCase.contains("from") || playerPassLowerCase.contains("select")
|
||||
|| playerPassLowerCase.contains(";") || playerPassLowerCase.contains("null")
|
||||
|| !playerPassLowerCase.matches(Settings.getPassRegex)) {
|
||||
if (!playerPassLowerCase.matches(Settings.getPassRegex)) {
|
||||
commandService.send(player, MessageKey.PASSWORD_MATCH_ERROR);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user