From 72d8cd7905b7aa18f76c325482e6fab07e5c1e4f Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Tue, 24 Oct 2023 06:30:10 -0700 Subject: [PATCH] Fix XHDR to inspect multiple articles properly. --- Rocksolid_Light/rslight/scripts/rslight-lib.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) mode change 100755 => 100644 Rocksolid_Light/rslight/scripts/rslight-lib.php diff --git a/Rocksolid_Light/rslight/scripts/rslight-lib.php b/Rocksolid_Light/rslight/scripts/rslight-lib.php old mode 100755 new mode 100644 index 395aefc..59ce1c8 --- a/Rocksolid_Light/rslight/scripts/rslight-lib.php +++ b/Rocksolid_Light/rslight/scripts/rslight-lib.php @@ -548,20 +548,26 @@ function get_xhdr($header, $articles) global $config_dir, $spooldir, $nntp_group, $nntp_article, $workpath, $path; $tmpgroup = $nntp_group; $mid = false; + // Use article pointer if (! isset($articles) && is_numeric($nntp_article)) { $articles = $nntp_article; } // By Message-ID - if (! is_numeric($articles)) { + if (strpos($articles, "@") !== false) { $found = find_article_by_msgid($articles); - $tmpgroup = $found['newsgroup']; + $nntp_group = $found['newsgroup']; + $first = $found['number']; + $last = $first; + $this_id = $found['msgid']; $articles = $found['number']; - if ($tmpgroup == '') { - $msg = "430 No article with that message-id\r\n"; - return $msg; + if (! isset($articles)) { + $output = "430 No article with that message-id\r\n"; + return $output; } + $output = "221 Header information for " . $header . " follows (from articles)\r\n"; } + if (! isset($tmpgroup)) { $msg = "412 no newsgroup selected\r\n"; return $msg;