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']); $message = stripslashes($_REQUEST['message']);
$secrethash = $_REQUEST['secrethash2']; $secrethash = $_REQUEST['secrethash2'];
if($_SESSION['_config']['secrethash'] != $secrethash || $secrethash == "" || $_SESSION['_config']['secrethash'] == "" || if($_SESSION['_config']['secrethash'] != $secrethash || $secrethash == "" || $_SESSION['_config']['secrethash'] == "")
strstr($subject, "botmetka") || strstr($subject, "servermetka") || strstr($who,"\n") || strstr($email,"\n") || strstr($subject,"\n") )
{ {
$id = $oldid; $id = $oldid;
$process = ""; $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; $oldid = 0;
$message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message; $message = "From: $who\nEmail: $email\nSubject: $subject\n\nMessage:\n".$message;
sendmail("support@cacert.org", "[CAcert.org] Possible SPAM", $message, $email, "", "", "CAcert Support"); sendmail("support@cacert.org", "[CAcert.org] Possible SPAM", $message, $email, "", "", "CAcert Support");
//echo "Alert! Alert! Alert! SPAM SPAM SPAM!!!<br><br><br>"; //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"; //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; 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) == "") if(trim($who) == "" || trim($email) == "" || trim($subject) == "" || trim($message) == "")
{ {

Loading…
Cancel
Save