Remove SHA-512 password migration
This commit is contained in:
@@ -550,11 +550,8 @@ public class Client extends ChannelInboundHandlerAdapter {
|
||||
if (getLoginState() > LOGIN_NOTLOGGEDIN) { // already loggedin
|
||||
loggedIn = false;
|
||||
loginok = 7;
|
||||
} else if (passhash.charAt(0) == '$' && passhash.charAt(1) == '2' && BCrypt.checkpw(pwd, passhash)) {
|
||||
} else if (BCrypt.checkpw(pwd, passhash)) {
|
||||
loginok = (tos == 0) ? 23 : 0;
|
||||
} else if (pwd.equals(passhash) || checkHash(passhash, "SHA-1", pwd) || checkHash(passhash, "SHA-512", pwd)) {
|
||||
// thanks GabrielSin for detecting some no-bcrypt inconsistencies here
|
||||
loginok = (tos == 0) ? (!YamlConfig.config.server.BCRYPT_MIGRATION ? 23 : -23) : (!YamlConfig.config.server.BCRYPT_MIGRATION ? 0 : -10); // migrate to bcrypt
|
||||
} else {
|
||||
loggedIn = false;
|
||||
loginok = 4;
|
||||
|
||||
Reference in New Issue
Block a user