nice fail
This commit is contained in:
parent
9823956658
commit
30564fad6e
@ -15,7 +15,7 @@ public class BCRYPT2Y implements EncryptionMethod {
|
|||||||
@Override
|
@Override
|
||||||
public boolean comparePassword(String hash, String password,
|
public boolean comparePassword(String hash, String password,
|
||||||
String playerName) throws NoSuchAlgorithmException {
|
String playerName) throws NoSuchAlgorithmException {
|
||||||
String ok = hash.substring(29);
|
String ok = hash.substring(0, 29);
|
||||||
if (ok.length() != 29)
|
if (ok.length() != 29)
|
||||||
return false;
|
return false;
|
||||||
return hash.equals(getHash(password, ok, playerName));
|
return hash.equals(getHash(password, ok, playerName));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user