From 01bcdc9ef5ae3da6a40c8d034153755c4fd3e81b Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Tue, 9 Jan 2024 08:51:32 -0700 Subject: [PATCH] Improve headers to make it easier to filter site or users. --- Rocksolid_Light/rocksolid/lib/post.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Rocksolid_Light/rocksolid/lib/post.inc.php b/Rocksolid_Light/rocksolid/lib/post.inc.php index c3f94ad..8f7840d 100644 --- a/Rocksolid_Light/rocksolid/lib/post.inc.php +++ b/Rocksolid_Light/rocksolid/lib/post.inc.php @@ -500,9 +500,11 @@ function message_post($subject, $from, $newsgroups, $ref, $body, $encryptthis = fputs($ns, 'Followup-To: ' . $followupto . "\r\n"); } fputs($ns, 'Newsgroups: ' . $newsgroups . "\r\n"); - $sitekey = password_hash($CONFIG['thissitekey'] . $msgid, PASSWORD_DEFAULT); + $sitekey = hash('sha1', $CONFIG['thissitekey'] . $_SERVER['HTTP_HOST']); + $posting_user = hash('sha1', $from . $CONFIG['thissitekey'] . $_SERVER['HTTP_HOST']); fputs($ns, 'X-Rslight-Site: ' . $sitekey . "\r\n"); - fputs($ns, 'X-Rslight-Posting-User: ' . hash('sha1', $from . $_SERVER['HTTP_HOST'] . $CONFIG['thissitekey']) . "\r\n"); + fputs($ns, 'X-Rslight-Posting-User: ' . $posting_user . "\r\n"); + fputs($ns, "X-How-To-Filter: Use 'X-Rslight-Site' to filter SITE or 'X-Rslight-Posting-User' to filter USER\r\n"); if (isset($encryptthis)) { fputs($ns, 'X-Rslight-To: ' . $encryptto . "\r\n"); $CONFIG['postfooter'] = "";