mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-26 04:05:28 +01:00
Fix CrazyCrypt1 need player real case
This commit is contained in:
parent
8db9c69ed0
commit
4de55d9efa
@ -126,7 +126,7 @@ public class API {
|
||||
String player = playerName.toLowerCase();
|
||||
PlayerAuth auth = database.getAuth(player);
|
||||
try {
|
||||
return PasswordSecurity.comparePasswordWithHash(passwordToCheck, auth.getHash(), player);
|
||||
return PasswordSecurity.comparePasswordWithHash(passwordToCheck, auth.getHash(), playerName);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class ChangePasswordCommand implements CommandExecutor {
|
||||
try {
|
||||
String hashnew = PasswordSecurity.getHash(Settings.getPasswordHash, args[1], name);
|
||||
|
||||
if (PasswordSecurity.comparePasswordWithHash(args[0], PlayerCache.getInstance().getAuth(name).getHash(), name)) {
|
||||
if (PasswordSecurity.comparePasswordWithHash(args[0], PlayerCache.getInstance().getAuth(name).getHash(), player.getName())) {
|
||||
PlayerAuth auth = PlayerCache.getInstance().getAuth(name);
|
||||
auth.setHash(hashnew);
|
||||
if (PasswordSecurity.userSalt.containsKey(name) && PasswordSecurity.userSalt.get(name) != null)
|
||||
|
@ -64,7 +64,7 @@ public class UnregisterCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
if (PasswordSecurity.comparePasswordWithHash(args[0], PlayerCache.getInstance().getAuth(name).getHash(), name)) {
|
||||
if (PasswordSecurity.comparePasswordWithHash(args[0], PlayerCache.getInstance().getAuth(name).getHash(), player.getName())) {
|
||||
if (!database.removeAuth(name)) {
|
||||
player.sendMessage("error");
|
||||
return true;
|
||||
|
@ -122,7 +122,7 @@ public class AsyncronousLogin {
|
||||
boolean passwordVerified = true;
|
||||
if (!forceLogin)
|
||||
try {
|
||||
passwordVerified = PasswordSecurity.comparePasswordWithHash(password, hash, name);
|
||||
passwordVerified = PasswordSecurity.comparePasswordWithHash(password, hash, realName);
|
||||
} catch (Exception ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
m._(player, "error");
|
||||
|
Loading…
Reference in New Issue
Block a user