fix dictionary, improve auth
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m39s
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m39s
This commit is contained in:
parent
819120100f
commit
739f0a9cc7
2 changed files with 374 additions and 374 deletions
File diff suppressed because it is too large
Load diff
|
@ -35,17 +35,17 @@ public class UserHandler {
|
||||||
return new DoubleTypedObject<>(Response.SERVER_ERROR.ordinal(), localTCN);
|
return new DoubleTypedObject<>(Response.SERVER_ERROR.ordinal(), localTCN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isReset) {
|
|
||||||
localTCN.set("hardware-id-reset", false);
|
|
||||||
localTCN.set("hardware-id", remoteHardwareID);
|
|
||||||
return new DoubleTypedObject<>(Response.RESET.ordinal(), localTCN);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!localHardwareID.equals(remoteTCN.getString("hardware-id"))) {
|
|
||||||
return new DoubleTypedObject<>(Response.HWID_INVALID.ordinal(), localTCN);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(BCrypt.verifyer().verify(remotePassword.toCharArray(), localPassword.toCharArray()).verified) {
|
if(BCrypt.verifyer().verify(remotePassword.toCharArray(), localPassword.toCharArray()).verified) {
|
||||||
|
if (isReset) {
|
||||||
|
localTCN.set("hardware-id-reset", false);
|
||||||
|
localTCN.set("hardware-id", remoteHardwareID);
|
||||||
|
return new DoubleTypedObject<>(Response.RESET.ordinal(), localTCN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!localHardwareID.equals(remoteTCN.getString("hardware-id"))) {
|
||||||
|
return new DoubleTypedObject<>(Response.HWID_INVALID.ordinal(), localTCN);
|
||||||
|
}
|
||||||
|
|
||||||
String remoteCommit = remoteTCN.getString("commit");
|
String remoteCommit = remoteTCN.getString("commit");
|
||||||
if("[dev]".equals(remoteCommit) || Main.loaderHash.equals(remoteCommit)) {
|
if("[dev]".equals(remoteCommit) || Main.loaderHash.equals(remoteCommit)) {
|
||||||
return new DoubleTypedObject<>(Response.OK.ordinal(), localTCN);
|
return new DoubleTypedObject<>(Response.OK.ordinal(), localTCN);
|
||||||
|
|
Loading…
Add table
Reference in a new issue