diff --git a/.gitignore b/.gitignore index 25eafee..00b5cda 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ diff --git a/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock b/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock deleted file mode 100644 index 9bece22..0000000 Binary files a/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock and /dev/null differ diff --git a/.gradle/7.1/dependencies-accessors/gc.properties b/.gradle/7.1/dependencies-accessors/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/7.1/executionHistory/executionHistory.bin b/.gradle/7.1/executionHistory/executionHistory.bin deleted file mode 100644 index c85e32c..0000000 Binary files a/.gradle/7.1/executionHistory/executionHistory.bin and /dev/null differ diff --git a/.gradle/7.1/executionHistory/executionHistory.lock b/.gradle/7.1/executionHistory/executionHistory.lock deleted file mode 100644 index fe0e652..0000000 Binary files a/.gradle/7.1/executionHistory/executionHistory.lock and /dev/null differ diff --git a/.gradle/7.1/fileChanges/last-build.bin b/.gradle/7.1/fileChanges/last-build.bin deleted file mode 100644 index f76dd23..0000000 Binary files a/.gradle/7.1/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/7.1/fileHashes/fileHashes.bin b/.gradle/7.1/fileHashes/fileHashes.bin deleted file mode 100644 index aa28748..0000000 Binary files a/.gradle/7.1/fileHashes/fileHashes.bin and /dev/null differ diff --git a/.gradle/7.1/fileHashes/fileHashes.lock b/.gradle/7.1/fileHashes/fileHashes.lock deleted file mode 100644 index d23b881..0000000 Binary files a/.gradle/7.1/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/7.1/gc.properties b/.gradle/7.1/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock b/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock deleted file mode 100644 index aca6280..0000000 Binary files a/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock and /dev/null differ diff --git a/.gradle/7.2/dependencies-accessors/gc.properties b/.gradle/7.2/dependencies-accessors/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/7.2/executionHistory/executionHistory.bin b/.gradle/7.2/executionHistory/executionHistory.bin deleted file mode 100644 index 2eb550e..0000000 Binary files a/.gradle/7.2/executionHistory/executionHistory.bin and /dev/null differ diff --git a/.gradle/7.2/executionHistory/executionHistory.lock b/.gradle/7.2/executionHistory/executionHistory.lock deleted file mode 100644 index 4c6fdda..0000000 Binary files a/.gradle/7.2/executionHistory/executionHistory.lock and /dev/null differ diff --git a/.gradle/7.2/fileChanges/last-build.bin b/.gradle/7.2/fileChanges/last-build.bin deleted file mode 100644 index f76dd23..0000000 Binary files a/.gradle/7.2/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/7.2/fileHashes/fileHashes.bin b/.gradle/7.2/fileHashes/fileHashes.bin deleted file mode 100644 index 19882c4..0000000 Binary files a/.gradle/7.2/fileHashes/fileHashes.bin and /dev/null differ diff --git a/.gradle/7.2/fileHashes/fileHashes.lock b/.gradle/7.2/fileHashes/fileHashes.lock deleted file mode 100644 index 0be7bf9..0000000 Binary files a/.gradle/7.2/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/7.2/fileHashes/resourceHashesCache.bin b/.gradle/7.2/fileHashes/resourceHashesCache.bin deleted file mode 100644 index db1931f..0000000 Binary files a/.gradle/7.2/fileHashes/resourceHashesCache.bin and /dev/null differ diff --git a/.gradle/7.2/gc.properties b/.gradle/7.2/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index 6b89188..0000000 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index 2b1a3ea..0000000 --- a/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Thu Apr 28 11:29:29 WIB 2022 -gradle.version=7.2 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index 80438fb..0000000 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock deleted file mode 100644 index 5aa18ae..0000000 Binary files a/.gradle/checksums/checksums.lock and /dev/null differ diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin deleted file mode 100644 index 8300a21..0000000 Binary files a/.gradle/checksums/md5-checksums.bin and /dev/null differ diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin deleted file mode 100644 index 3867142..0000000 Binary files a/.gradle/checksums/sha1-checksums.bin and /dev/null differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..5c2d1cf Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/src/main/java/me/exzork/gcauth/handler/ChangePasswordHandler.java b/src/main/java/me/exzork/gcauth/handler/ChangePasswordHandler.java index 9e31e89..0da7621 100644 --- a/src/main/java/me/exzork/gcauth/handler/ChangePasswordHandler.java +++ b/src/main/java/me/exzork/gcauth/handler/ChangePasswordHandler.java @@ -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;