Article View: news.software.nntp
Article #90032No colon-space in header field check in INN
From: Jesse Rehmer
Date: Wed, 01 Feb 2023 06:19
Date: Wed, 01 Feb 2023 06:19
31 lines
2268 bytes
2268 bytes
I've been on auto-pilot for a bit, but started checking logs/reports today and
notice an increasing number of articles rejected due to the following:
439 No colon-space in "User-Agent:" header field
When reviewing headers of the those messages there is a User-Agent: header,
but its blank and does not contain a space.
It is probably against a RFC to accept these messages, but I'm not concerned
about the User-Agent header. I went looking for a way to relax the check, but
is strict for all headers in innd/art.c:
/* Find first colon */
if ((colon = memchr(header, ':', size)) == NULL || !ISWHITE(colon[1])) {
if ((p = memchr(header, '\r', size)) != NULL)
*p = '\0';
snprintf(cp->Error, sizeof(cp->Error),
"%d No colon-space in \"%s\" header field",
ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
MaxLength(header, header));
if (p != NULL)
*p = '\r';
return;
}
I know there are potential implications for accepting messages with empty
headers, but do we need to treat all headers so strictly?
Regards,
Jesse Rehmer
Technical Details
Message-ID:
<trd09m$1369$1@nnrp.usenet.blueworldhosting.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> Subject: No colon-space in header field check in INN Date: Wed, 01 Feb 2023 06:19:34 +0000 From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 1 Feb 2023 06:19:34 -0000 (UTC) Injection-Info: nnrp.usenet.blueworldhosting.com; logging-data="36041"; mail-complaints-to="usenet@blueworldhosting.com" User-Agent: Usenapp for MacOS Cancel-Lock: sha1:KYwE4NO1gZ1f4kCVsexstSVgIqI= sha256:bKGCqqVDTunuEi1vmgrtuOLyDY+TfR1DWT3x2Y/MipI= sha1:mcoSY1QSQfFDNFuCXSyEBP6sjdg= sha256:7uhM5oIhnvl2rF37T4eX1PaT/wI0yUXLzLdfMaJrS4E= X-Usenapp: v1.26/d - Full License Lines: 30