From 59c81f14d4399da57350cd0649c2361de0793424 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Tue, 2 Jan 2024 05:16:53 -0700 Subject: [PATCH] Strip tabs from From: header when logging spam/ham. --- Rocksolid_Light/rocksolid/newsportal.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index 1b0eadb..3509c46 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -62,7 +62,8 @@ function nntp_open($nserver = 0, $nport = 0) echo '
'; echo '

Please wait a few moments and try again. If you see the same error, notify the owner that their Message Server is offline.

'; echo ''; - exit(0); + return false; + // exit(0); } $weg = line_read($ns); // kill the first line @@ -1363,10 +1364,10 @@ function check_spam($subject, $from, $newsgroups, $ref, $body, $msgid, $useheade } unlink($spamfile); if ($res === 1) { - file_put_contents($logfile, "\n" . format_log_date() . " spamc:\tSPAM\t" . $msgid . "\t" . $newsgroups . "\t" . $from, FILE_APPEND); + file_put_contents($logfile, "\n" . format_log_date() . " spamc:\tSPAM\t" . $msgid . "\t" . $newsgroups . "\t" . preg_replace('/\t/', ' ', $from), FILE_APPEND); file_put_contents($spamdir . '/' . $msgid, $spamresult); } else { - file_put_contents($logfile, "\n" . format_log_date() . " spamc:\tHAM\t" . $msgid . "\t" . $newsgroups . "\t" . $from, FILE_APPEND); + file_put_contents($logfile, "\n" . format_log_date() . " spamc:\tHAM\t" . $msgid . "\t" . $newsgroups . "\t" . preg_replace('/\t/', ' ', $from), FILE_APPEND); } return array( 'res' => $res,