Add a simple CAPTCHA to the sign up form

Add a CAPTCHA to protect against automated account creation. The CAPTCHA
changes whenever three new accounts are registered.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2019-09-06 14:34:38 -04:00
parent a66c7fa615
commit d6ae970785
3 changed files with 95 additions and 4 deletions

View file

@ -36,7 +36,12 @@ if (in_request("Action") == "NewAccount") {
0,
in_request("CN"),
in_request("UN"),
in_request("ON"));
in_request("ON"),
0,
"",
in_request("captcha_salt"),
in_request("captcha"),
);
print $message;
@ -59,7 +64,12 @@ if (in_request("Action") == "NewAccount") {
0,
in_request("CN"),
in_request("UN"),
in_request("ON"));
in_request("ON"),
0,
"",
in_request("captcha_salt"),
in_request("captcha")
);
}
} else {
print '<p>' . __("Use this form to create an account.") . '</p>';