Bypass account registration captcha on test devices

This commit is contained in:
Ravi Khadiwala
2022-06-09 13:35:14 -04:00
committed by Chris Eager
parent 8507b6a1f0
commit 327eb0219d
2 changed files with 44 additions and 2 deletions

View File

@@ -728,8 +728,11 @@ public class AccountController {
Optional<String> pushChallenge,
String userAgent)
{
final String countryCode = Util.getCountryCode(number);
if (testDevices.containsKey(number)) {
return new CaptchaRequirement(false, false);
}
final String countryCode = Util.getCountryCode(number);
if (captchaToken.isPresent()) {
boolean validToken = recaptchaClient.verify(captchaToken.get(), sourceHost);