mirror of
https://github.com/exzork/GCAuth.git
synced 2024-11-27 18:01:14 +00:00
Fix ChangePassword Error
This commit is contained in:
parent
84f30d387d
commit
7f5a0956e9
3
.gitignore
vendored
3
.gitignore
vendored
@ -30,3 +30,6 @@ out
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# Ignore Gradle project-specific cache directory
|
||||||
|
.gradle/
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
#Thu Apr 28 11:29:29 WIB 2022
|
|
||||||
gradle.version=7.2
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@ -32,18 +32,19 @@ public class ChangePasswordHandler implements HttpContextHandler {
|
|||||||
authResponse.success = false;
|
authResponse.success = false;
|
||||||
authResponse.message = "INVALID_ACCOUNT"; // ENG = "Invalid username or password"
|
authResponse.message = "INVALID_ACCOUNT"; // ENG = "Invalid username or password"
|
||||||
authResponse.jwt = "";
|
authResponse.jwt = "";
|
||||||
}
|
|
||||||
if (changePasswordAccount.new_password.length() >= 8) {
|
|
||||||
String newPassword = Authentication.generateHash(changePasswordAccount.new_password);
|
|
||||||
account.setPassword(newPassword);
|
|
||||||
account.save();
|
|
||||||
authResponse.success = true;
|
|
||||||
authResponse.message = "";
|
|
||||||
authResponse.jwt = "";
|
|
||||||
} else {
|
} else {
|
||||||
authResponse.success = false;
|
if (changePasswordAccount.new_password.length() >= 8) {
|
||||||
authResponse.message = "PASSWORD_INVALID"; // ENG = "Password must be at least 8 characters long"
|
String newPassword = Authentication.generateHash(changePasswordAccount.new_password);
|
||||||
authResponse.jwt = "";
|
account.setPassword(newPassword);
|
||||||
|
account.save();
|
||||||
|
authResponse.success = true;
|
||||||
|
authResponse.message = "";
|
||||||
|
authResponse.jwt = "";
|
||||||
|
} else {
|
||||||
|
authResponse.success = false;
|
||||||
|
authResponse.message = "PASSWORD_INVALID"; // ENG = "Password must be at least 8 characters long"
|
||||||
|
authResponse.jwt = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
authResponse.success = false;
|
authResponse.success = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user