summaryrefslogtreecommitdiff
path: root/www/index.php
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2013-01-16 04:17:53 +0100
committerBenny Baumann <BenBE@geshi.org>2013-01-16 04:17:53 +0100
commit82dbce519b4a3abab2c2b2bd714ceb248542b941 (patch)
treefdf649b88a4047481ba60c3f6d39a94df7e64c19 /www/index.php
parentedf7b3cf0e846188d6c606dabeac9c3b4e4b71bf (diff)
parent2b28585e5f4f56f4766ac144d3470273893a457e (diff)
downloadcacert-devel-82dbce519b4a3abab2c2b2bd714ceb248542b941.tar.gz
cacert-devel-82dbce519b4a3abab2c2b2bd714ceb248542b941.tar.xz
cacert-devel-82dbce519b4a3abab2c2b2bd714ceb248542b941.zip
Merge branch 'bug-795' into release
Diffstat (limited to 'www/index.php')
-rw-r--r--www/index.php40
1 files changed, 22 insertions, 18 deletions
diff --git a/www/index.php b/www/index.php
index 41b6d7a..35d22d7 100644
--- a/www/index.php
+++ b/www/index.php
@@ -563,6 +563,13 @@ require_once('../includes/lib/l10n.php');
$subject = stripslashes($_REQUEST['subject']);
$message = stripslashes($_REQUEST['message']);
$secrethash = $_REQUEST['secrethash2'];
+
+ //check for spam via honeypot
+ if(!isset($_REQUEST['robotest']) || !empty($_REQUEST['robotest'])){
+ echo _("Form could not be sent.");
+ showfooter();
+ exit;
+ }
if($_SESSION['_config']['secrethash'] != $secrethash || $secrethash == "" || $_SESSION['_config']['secrethash'] == "")
{
@@ -603,26 +610,23 @@ require_once('../includes/lib/l10n.php');
}
}
- if($oldid == 11 && $process != "" && $_REQUEST['support'] != "yes")
- {
- $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message;
-
- sendmail("support@cacert.org", "[CAcert.org] ".$subject, $message, $email, "", "", "CAcert Support");
- showheader(_("Welcome to CAcert.org"));
- echo _("Your message has been sent.");
- showfooter();
- exit;
- }
-
- if($oldid == 11 && $process != "" && $_REQUEST['support'] == "yes")
+ if($oldid == 11 && $process != "")
{
$message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message;
-
- sendmail("cacert-support@lists.cacert.org", "[website form email]: ".$subject, $message, "website-form@cacert.org", "cacert-support@lists.cacert.org, $email", "", "CAcert-Website");
- showheader(_("Welcome to CAcert.org"));
- echo _("Your message has been sent to the general support list.");
- showfooter();
- exit;
+ if (isset($process[0])){
+ sendmail("cacert-support@lists.cacert.org", "[website form email]: ".$subject, $message, "website-form@cacert.org", "cacert-support@lists.cacert.org, $email", "", "CAcert-Website");
+ showheader(_("Welcome to CAcert.org"));
+ echo _("Your message has been sent to the general support list.");
+ showfooter();
+ exit;
+ }
+ if (isset($process[1])){
+ sendmail("support@cacert.org", "[CAcert.org] ".$subject, $message, $email, "", "", "CAcert Support");
+ showheader(_("Welcome to CAcert.org"));
+ echo _("Your message has been sent.");
+ showfooter();
+ exit;
+ }
}
if(!array_key_exists('signup',$_SESSION) || $_SESSION['signup']['year'] < 1900)