aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarf20 <aruizfernandez05@gmail.com>2026-07-01 20:21:58 +0200
committerarf20 <aruizfernandez05@gmail.com>2026-07-01 20:21:58 +0200
commitb5711367898e2fc51abb1cccd77fbbf8a7ba7f31 (patch)
tree1031e37e293cf06a2fe1ab3d3f24fe4fb9c0cc27
parentb7ed54f91c373aef452b3540c8cd352d11305c30 (diff)
downloadarfnet2-lists-b5711367898e2fc51abb1cccd77fbbf8a7ba7f31.tar.gz
arfnet2-lists-b5711367898e2fc51abb1cccd77fbbf8a7ba7f31.zip
Fix captcha
-rw-r--r--mlmmj.php6
-rw-r--r--subscribe.php5
2 files changed, 6 insertions, 5 deletions
diff --git a/mlmmj.php b/mlmmj.php
index 70d6488..e6093be 100644
--- a/mlmmj.php
+++ b/mlmmj.php
@@ -56,7 +56,7 @@ class mlmmj
!isset($_POST["job"]) &&
!isset($_POST["redirect_success"]) &&
!isset($_POST["redirect_failure"]) &&
- !isset($_POST["random"])) &&
+ !isset($_POST["random"]) &&
!isset($_POST["captcha"]))
{
$this->errors = TRUE;
@@ -75,7 +75,7 @@ class mlmmj
// Check the random string to be valid and return an error message
// otherwise.
- if (!$captchas->validate ($random_string))
+ if (!$captchas->validate ($_POST["random"]))
{
$this->error(
"The session key (random) does not exist, please go back and reload form.<br/>"
@@ -85,7 +85,7 @@ class mlmmj
}
// Check, that the right CAPTCHA password has been entered and
// return an error message otherwise.
- elseif (!$captchas->verify ($password))
+ elseif (!$captchas->verify ($_POST["captcha"]))
{
$this->error("You entered the wrong password. Aren't you human? Please use back button and reload.";
}
diff --git a/subscribe.php b/subscribe.php
index f2e9d56..64331c4 100644
--- a/subscribe.php
+++ b/subscribe.php
@@ -49,13 +49,14 @@ $domain = "arf20.com"
<h2>Unsubscription</h2>
<form action="mlmmj.php" method="post">
<label>Email</label><br>
- <input type="email" name="email">
+ <input type="email" name="email"><br>
<input name="mailinglist" type="hidden" value="<?php echo $list."@".$domain; ?>">
<input name="job" type="hidden" value="unsubscribe">
<input name="redirect_failure" type="hidden" value="/error.html">
<input name="redirect_success" type="hidden" value="/">
<input type="hidden" name="random" value="<?= $captchas->random () ?>" />
- <input name="captcha" size="6" />
+ <label>Captcha</label><br>
+ <input name="captcha" size="6" /><br>
<br><input type="submit" value="Subscribe">
</form>
<?= $captchas->image () ?> <a href="javascript:captchas_image_reload('captchas.net')">Reload Image</a>