From 6e6049948c642e7c0218f2112da9314a768b5edd Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Wed, 28 Jun 2023 21:32:16 +0100 Subject: [PATCH] More sensible logging. --- .../com/marsspiders/ukwa/controllers/FeedbackController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/marsspiders/ukwa/controllers/FeedbackController.java b/src/main/java/com/marsspiders/ukwa/controllers/FeedbackController.java index 15bfdc0..bd1be55 100644 --- a/src/main/java/com/marsspiders/ukwa/controllers/FeedbackController.java +++ b/src/main/java/com/marsspiders/ukwa/controllers/FeedbackController.java @@ -54,7 +54,6 @@ public ModelAndView sendFeedback(@RequestParam(value = "name", required = false) @RequestParam(value = "email", required = false) String email, @RequestParam(value = "comments", required = false) String comments, @RequestParam(value = "g-recaptcha-response", required = true) String gRecaptchaResponse ) { - log.info("sendFeedback got gRecaptchaResponse="+gRecaptchaResponse); // Check Captcha worked: this.checkCaptcha(gRecaptchaResponse); @@ -117,10 +116,13 @@ public ModelAndView sendNominateRequest(@RequestParam(value = "name", required = * @return */ private boolean checkCaptcha(String gRecaptchaResponse) { + log.info("Validating ReCAPTCHA..." + gRecaptchaResponse.substring(0, 10)); boolean passed = this.isCaptchaValid(this.gRecaptchaSecretKey, gRecaptchaResponse); if( !passed ) { + log.info("ReCAPTCHA " + gRecaptchaResponse.substring(0, 10) + " failed!"); throw new RuntimeException("ReCAPTCHA Validation Failed!"); } + log.info("ReCAPTCHA " + gRecaptchaResponse.substring(0, 10) + " passed!"); return passed; }