mirror of
https://github.com/exzork/GCAuth.git
synced 2024-11-23 16:17:52 +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
|
||||
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.message = "INVALID_ACCOUNT"; // ENG = "Invalid username or password"
|
||||
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 {
|
||||
authResponse.success = false;
|
||||
authResponse.message = "PASSWORD_INVALID"; // ENG = "Password must be at least 8 characters long"
|
||||
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 {
|
||||
authResponse.success = false;
|
||||
authResponse.message = "PASSWORD_INVALID"; // ENG = "Password must be at least 8 characters long"
|
||||
authResponse.jwt = "";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
authResponse.success = false;
|
||||
|
Loading…
Reference in New Issue
Block a user