Add settings for CAPTCHA in account recovery.

Allowing users to enable it and specify the site and secret key to use
with reCAPTCHA.

The old hard-coded keys were insecure; the secret key must not be
distributed publicly. The current defaults are the test keys provided at
https://developers.google.com/recaptcha/docs/faq#id-like-to-run-automated-tests-with-recaptcha-v2-what-should-i-do

Signed-off-by: Peter Marheine <peter@taricorp.net>
This commit is contained in:
Peter Marheine
2018-08-11 21:04:57 +10:00
parent 749342f25e
commit a928b9ee3f
5 changed files with 106 additions and 1 deletions
@@ -91,7 +91,34 @@
<c:import url="helpToolTip.jsp"><c:param name="topic" value="smtpCredentials"/></c:import>
</td>
</tr>
</table>
<table class="indent">
<tr>
<td colspan="2">
<form:checkbox path="captchaEnabled" id="enablecaptcha" cssclass="checkbox"/>
<label for="enablecaptcha">
<fmt:message key="advancedsettings.enableCaptcha"/>
</label>
<c:import url="helpToolTip.jsp"><c:param name="topic" value="captcha"/></c:import>
</td>
</tr>
<tr>
<td><fmt:message key="advancedsettings.recaptchaSiteKey"/></td>
<td>
<form:input path="recaptchaSiteKey" size="50"/>
<c:import url="helpToolTip.jsp"><c:param name="topic" value="recaptchaSiteKey"/></c:import>
</td>
</tr>
<tr>
<td><fmt:message key="advancedsettings.recaptchaSecretKey"/></td>
<td>
<form:input path="recaptchaSecretKey" size="50"/>
<c:import url="helpToolTip.jsp"><c:param name="topic" value="recaptchaSecretKey"/></c:import>
</td>
</tr>
</table>
<table class="indent"><tr><td>
@@ -152,4 +179,4 @@
</script>
</c:if>
</body></html>
</body></html>