summaryrefslogtreecommitdiffstats
path: root/web/template/account_edit_form.php
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2019-09-06 20:34:38 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2019-10-05 19:44:00 +0200
commitd6ae970785092124adbe48eb9a759c8c804b13a6 (patch)
treeb0845b1633e9228dbbd4fed35169bf990c1e292f /web/template/account_edit_form.php
parenta66c7fa6156b9babb81cd6a1143737a2a193634b (diff)
downloadaur-d6ae970785092124adbe48eb9a759c8c804b13a6.tar.gz
aur-d6ae970785092124adbe48eb9a759c8c804b13a6.tar.xz
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>
Diffstat (limited to 'web/template/account_edit_form.php')
-rw-r--r--web/template/account_edit_form.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php
index 38d5274c..5e84aa71 100644
--- a/web/template/account_edit_form.php
+++ b/web/template/account_edit_form.php
@@ -174,6 +174,17 @@
</p>
</fieldset>
+ <?php if ($A != "UpdateAccount"): ?>
+ <fieldset>
+ <legend><?= __("To protect the AUR against automated account creation, we kindly ask you to provide the output of the following command:") ?> <code><?= htmlspecialchars($captcha_challenge) ?></code></legend>
+ <p>
+ <label for="id_captcha"><?= __("Answer") ?>:</label>
+ <input type="text" size="30" maxlength="6" name="captcha" id="id_captcha" value="<?= htmlspecialchars($captcha, ENT_QUOTES) ?>" /> (<?= __("required") ?>)
+ <input type="hidden" name="captcha_salt" value="<?= htmlspecialchars($captcha_salt) ?>" />
+ </p>
+ </fieldset>
+ <?php endif; ?>
+
<fieldset>
<p>
<label></label>