From a2da48bb864399bd09098c65fbccc79533ba913c Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sun, 29 Sep 2024 10:17:13 -0700 Subject: [PATCH] Try to catch unreadable or incorrect dates (1 Jan 1970) in spoolnews.php. --- Rocksolid_Light/rocksolid/newsportal.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index 1adbc4a..1092373 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -3007,6 +3007,11 @@ function check_article_integrity($rawmessage) $returnval = " Skipping message (date in future): " . $message->header->id . " (" . date('M d H:i:s', $message->header->date) . ")"; return $returnval; } + // Date is probably 1 Jan 1970 + if ($message->header->date < 100) { + $returnval = " Skipping message (date too old): " . $message->header->id . " (" . date('M d H:i:s', $message->header->date) . ")"; + return $returnval; + } // Now we know if the message is a mime-multipart message: $content_type = explode("/", $message->header->content_type[0]); if ($content_type[0] == "multipart") {