Seperated Spam from Javascript/Cookie Handling to narrow down problems

pull/1/head
Philipp Dunkel 15 years ago
parent 7263c41682
commit 99c9b16cc1

@ -565,21 +565,35 @@
$message = stripslashes($_REQUEST['message']);
$secrethash = $_REQUEST['secrethash2'];
if($_SESSION['_config']['secrethash'] != $secrethash || $secrethash == "" || $_SESSION['_config']['secrethash'] == "" ||
strstr($subject, "botmetka") || strstr($subject, "servermetka") || strstr($who,"\n") || strstr($email,"\n") || strstr($subject,"\n") )
if($_SESSION['_config']['secrethash'] != $secrethash || $secrethash == "" || $_SESSION['_config']['secrethash'] == "")
{
$id = $oldid;
$process = "";
$_SESSION['_config']['errmsg'] = _("This seems like potential spam, or you have cookies or Javascript disabled, cannot continue.");
$_SESSION['_config']['errmsg'] = _("This seems like you have cookies or Javascript disabled, cannot continue.");
$oldid = 0;
$message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message;
sendmail("support@cacert.org", "[CAcert.org] Possible SPAM", $message, $email, "", "", "CAcert Support");
//echo "Alert! Alert! Alert! SPAM SPAM SPAM!!!<br><br><br>";
//if($_SESSION['_config']['secrethash'] != $secrethash) echo "Hash does not match: $secrethash vs. ".$_SESSION['_config']['secrethash']."\n";
echo "This seems like potential spam, or you have cookies or Javascript disabled, cannot continue.";
echo _("This seems like you have cookies or Javascript disabled, cannot continue.");
die;
}
if(strstr($subject, "botmetka") || strstr($subject, "servermetka") || strstr($who,"\n") || strstr($email,"\n") || strstr($subject,"\n") )
{
$id = $oldid;
$process = "";
$_SESSION['_config']['errmsg'] = _("This seems like potential spam, cannot continue.");
$oldid = 0;
$message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message;
sendmail("support@cacert.org", "[CAcert.org] Possible SPAM", $message, $email, "", "", "CAcert Support");
//echo "Alert! Alert! Alert! SPAM SPAM SPAM!!!<br><br><br>";
//if($_SESSION['_config']['secrethash'] != $secrethash) echo "Hash does not match: $secrethash vs. ".$_SESSION['_config']['secrethash']."\n";
echo _("This seems like potential spam, cannot continue.");
die;
}
if(trim($who) == "" || trim($email) == "" || trim($subject) == "" || trim($message) == "")
{

Loading…
Cancel
Save