mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +01:00
Stop differentiating between wrong pass and user not existing
This commit is contained in:
parent
5fae224ef6
commit
3b52cc5f0c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user