Fix CrazyCrypt1 need player real case
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user