Only write posting-user to config if auth used.

This commit is contained in:
Retro_Guy 2024-10-01 08:00:09 -07:00
parent 62c75e8b4f
commit f6b80489fd
1 changed files with 10 additions and 9 deletions

View File

@ -527,8 +527,10 @@ function message_post($subject, $from, $newsgroups, $ref, $body, $encryptthis =
$posting_user = hash('sha1', strtolower($authname) . $CONFIG['thissitekey'] . $_SERVER['HTTP_HOST']); $posting_user = hash('sha1', strtolower($authname) . $CONFIG['thissitekey'] . $_SERVER['HTTP_HOST']);
fputs($ns, 'X-Rslight-Site: ' . $sitekey . "\r\n"); fputs($ns, 'X-Rslight-Site: ' . $sitekey . "\r\n");
fputs($ns, 'X-Rslight-Posting-User: ' . $posting_user . "\r\n"); fputs($ns, 'X-Rslight-Posting-User: ' . $posting_user . "\r\n");
if ($userconfig) {
set_user_config($authname, 'posting-user', $posting_user); set_user_config($authname, 'posting-user', $posting_user);
} }
}
if (isset($encryptthis)) { if (isset($encryptthis)) {
fputs($ns, 'X-Rslight-To: ' . $encryptto . "\r\n"); fputs($ns, 'X-Rslight-To: ' . $encryptto . "\r\n");
@ -634,4 +636,3 @@ function message_post($subject, $from, $newsgroups, $ref, $body, $encryptthis =
} }
return $message; return $message;
} }
?>