From 3b52cc5f0ccc4c3eca8beb64424f440c3a967ee1 Mon Sep 17 00:00:00 2001 From: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com> Date: Sat, 23 Jan 2021 21:54:27 +0200 Subject: [PATCH] Stop differentiating between wrong pass and user not existing --- .../plan/delivery/webserver/resolver/auth/LoginResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/resolver/auth/LoginResolver.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/resolver/auth/LoginResolver.java index 72f550f4b..f08e31a80 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/resolver/auth/LoginResolver.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/resolver/auth/LoginResolver.java @@ -71,7 +71,7 @@ public class LoginResolver implements NoAuthResolver { String username = query.get("user").orElseThrow(() -> new BadRequestException("'user' parameter not defined")); String password = query.get("password").orElseThrow(() -> new BadRequestException("'password' parameter not defined")); User user = dbSystem.getDatabase().query(WebUserQueries.fetchUser(username)) - .orElseThrow(() -> new BadRequestException(FailReason.USER_DOES_NOT_EXIST.getReason() + ": " + username)); + .orElseThrow(() -> new WebUserAuthException(FailReason.USER_PASS_MISMATCH)); boolean correctPass = user.doesPasswordMatch(password); if (!correctPass) {