change v1/challenge response for invalid captcha

This commit is contained in:
ravi-signal
2023-03-21 17:38:30 -05:00
committed by GitHub
parent 05b43a878b
commit 890293e429
3 changed files with 41 additions and 11 deletions

View File

@@ -63,7 +63,7 @@ public class RateLimitChallengeManager {
}
}
public void answerRecaptchaChallenge(final Account account, final String captcha, final String mostRecentProxyIp, final String userAgent)
public boolean answerRecaptchaChallenge(final Account account, final String captcha, final String mostRecentProxyIp, final String userAgent)
throws RateLimitExceededException, IOException {
rateLimiters.getRecaptchaChallengeAttemptLimiter().validate(account.getUuid());
@@ -82,6 +82,7 @@ public class RateLimitChallengeManager {
rateLimiters.getRecaptchaChallengeSuccessLimiter().validate(account.getUuid());
resetRateLimits(account);
}
return challengeSuccess;
}
private void resetRateLimits(final Account account) throws RateLimitExceededException {