Skip to content

Commit

Permalink
Change this code to not log user-controlled data.
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoZambrana committed Jan 2, 2025
1 parent 709a14f commit 99a90c3
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,8 @@ private boolean parseCaptchaResponse(String response) {
public boolean isValidCaptchaResponse(String reCaptchaResponse) {
try (CloseableHttpClient httpClient = HttpClients.createDefault();) {
appLogger.info("Start verifying reCAPTCHA response");
appLogger.info("reCAPTCHA response value: " + reCaptchaResponse);

String skGoogleApiReCaptcha = EJBFactory.getInstance().getElectionsParametersEJB().getParameter(Constants.SK_GOOGLE_API_RECAPTCHA);
String checkURL = "https://www.google.com/recaptcha/api/siteverify" + "?secret=" + skGoogleApiReCaptcha + "&response=" + reCaptchaResponse;

appLogger.info("Check URL: " + checkURL);

HttpPost post = new HttpPost("https://www.google.com/recaptcha/api/siteverify");

Expand Down

0 comments on commit 99a90c3

Please sign in to comment.