diff options
author | Benny Baumann <BenBE@geshi.org> | 2013-01-16 04:17:53 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2013-01-16 04:17:53 +0100 |
commit | 82dbce519b4a3abab2c2b2bd714ceb248542b941 (patch) | |
tree | fdf649b88a4047481ba60c3f6d39a94df7e64c19 /www/index.php | |
parent | edf7b3cf0e846188d6c606dabeac9c3b4e4b71bf (diff) | |
parent | 2b28585e5f4f56f4766ac144d3470273893a457e (diff) | |
download | cacert-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.php | 40 |
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) |