Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Though I'll admit readability suffers slightly... -- Larry Wall in <2969@jato.Jpl.Nasa.Gov>


computers / news.software.nntp / No colon-space in header field check in INN

SubjectAuthor
* No colon-space in header field check in INNJesse Rehmer
+* Re: No colon-space in header field check in INNRuss Allbery
|+* Re: No colon-space in header field check in INNNigel Reed
||+- Re: No colon-space in header field check in INNJesse Rehmer
||`- Re: No colon-space in header field check in INNGrant Taylor
|`- Re: No colon-space in header field check in INNGrant Taylor
+* Re: No colon-space in header field check in INNJulien ÉLIE
|`* Re: No colon-space in header field check in INNJesse Rehmer
| `- Re: No colon-space in header field check in INNJulien ÉLIE
`* Re: No colon-space in header field check in INND Finnigan
 `* Re: No colon-space in header field check in INNJulian Bradfield
  `* Re: No colon-space in header field check in INND Finnigan
   `- Re: No colon-space in header field check in INNRuss Allbery

1
No colon-space in header field check in INN

<trd09m$1369$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1359&group=news.software.nntp#1359

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: No colon-space in header field check in INN
Date: Wed, 1 Feb 2023 06:19:34 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <trd09m$1369$1@nnrp.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
 by: Jesse Rehmer - Wed, 1 Feb 2023 06:19 UTC

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

Re: No colon-space in header field check in INN

<87bkmdnzo2.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1362&group=news.software.nntp#1362

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Wed, 01 Feb 2023 08:00:45 -0800
Organization: The Eyrie
Message-ID: <87bkmdnzo2.fsf@hope.eyrie.org>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="20486"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:PjOg6UvaKAFI0CzvD1cXeFFXa1c=
 by: Russ Allbery - Wed, 1 Feb 2023 16:00 UTC

Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:

> 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?

We do need to be pretty strict, since otherwise you can get into really
nasty situations with ambiguous parses where two servers may disagree
about something fundamental like the message ID of the article.

I think if someone wanted to send a patch that added the ability to accept
articles with headers that (a) weren't part of the protocol (so not
Message-ID, Path, etc.), (b) specifically ended in a colon and a newline
and no other variation, and (c) did not have a continuation, and it was
configurable with the syntaxchecks setting and was off by default, that
would be worth considering. I wouldn't want to relax the checks any
farther than that. (It may be a bit difficult to wedge that into innd's
code, though, since the above error happens at a fairly low level of the
parse.)

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: No colon-space in header field check in INN

<20230201120350.09e5e61a@wibble.sysadmininc.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1364&group=news.software.nntp#1364

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.endofthelinebbs.com!.POSTED.47.186.32.124!not-for-mail
From: sysop@endofthelinebbs.com (Nigel Reed)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Wed, 1 Feb 2023 12:03:50 -0600
Organization: End Of The Line BBS
Message-ID: <20230201120350.09e5e61a@wibble.sysadmininc.com>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
<87bkmdnzo2.fsf@hope.eyrie.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: www.sysadmininc.com; posting-host="47.186.32.124";
logging-data="3160250"; mail-complaints-to="usenet@www.sysadmininc.com"
X-Newsreader: Claws Mail 4.1.1git14 (GTK 3.24.20; x86_64-pc-linux-gnu)
 by: Nigel Reed - Wed, 1 Feb 2023 18:03 UTC

On Wed, 01 Feb 2023 08:00:45 -0800
Russ Allbery <eagle@eyrie.org> wrote:

> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
>
> > 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?
>
> We do need to be pretty strict, since otherwise you can get into
> really nasty situations with ambiguous parses where two servers may
> disagree about something fundamental like the message ID of the
> article.
>
> I think if someone wanted to send a patch that added the ability to
> accept articles with headers that (a) weren't part of the protocol
> (so not Message-ID, Path, etc.), (b) specifically ended in a colon
> and a newline and no other variation, and (c) did not have a
> continuation, and it was configurable with the syntaxchecks setting
> and was off by default, that would be worth considering. I wouldn't
> want to relax the checks any farther than that. (It may be a bit
> difficult to wedge that into innd's code, though, since the above
> error happens at a fairly low level of the parse.)

I wouldn't be happy about relaxing the checks or having a server feed
in that does. They're there for a reason. Most legitimate users are
going to follow the RFC. Spammers and script kiddies are less likely to
adhere to the requirements, which is where we get them.

The proper course of action is to identify if the messages are
legitimate and then refer the poster to their software's author to
correct the issue.

Once you start making exceptions for one, then you're going to be
making exceptions for others and, as you say, this could lead to a
nasty mess. Let's please not fix innd which isn't broken to fix a
client that is.

--
End Of The Line BBS - Plano, TX
telnet endofthelinebbs.com 23

Re: No colon-space in header field check in INN

<treml8$1nrq$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1365&group=news.software.nntp#1365

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Wed, 1 Feb 2023 21:47:20 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <treml8$1nrq$1@nnrp.usenet.blueworldhosting.com>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <87bkmdnzo2.fsf@hope.eyrie.org> <20230201120350.09e5e61a@wibble.sysadmininc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 1 Feb 2023 21:47:20 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="57210"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:EW5Wsj/AfFm2Xt74ZS84ZUl1Mv0= sha256:gsviC99h43UG0se2FETFuystMQAbiMctWoiHPtApLME=
sha1:NE4ERMGj0KK1LFKIo3Nm60iHP54= sha256:eVanY9DAX+teJJL0N4cjtKST5ntZlKNHdN11kLCA8Xk=
X-Usenapp: v1.26/d - Full License
 by: Jesse Rehmer - Wed, 1 Feb 2023 21:47 UTC

On Feb 1, 2023 at 12:03:50 PM CST, "Nigel Reed" <sysop@endofthelinebbs.com>
wrote:

> On Wed, 01 Feb 2023 08:00:45 -0800
> Russ Allbery <eagle@eyrie.org> wrote:
>
>> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
>>
>>> 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?
>>
>> We do need to be pretty strict, since otherwise you can get into
>> really nasty situations with ambiguous parses where two servers may
>> disagree about something fundamental like the message ID of the
>> article.
>>
>> I think if someone wanted to send a patch that added the ability to
>> accept articles with headers that (a) weren't part of the protocol
>> (so not Message-ID, Path, etc.), (b) specifically ended in a colon
>> and a newline and no other variation, and (c) did not have a
>> continuation, and it was configurable with the syntaxchecks setting
>> and was off by default, that would be worth considering. I wouldn't
>> want to relax the checks any farther than that. (It may be a bit
>> difficult to wedge that into innd's code, though, since the above
>> error happens at a fairly low level of the parse.)
>
> I wouldn't be happy about relaxing the checks or having a server feed
> in that does. They're there for a reason. Most legitimate users are
> going to follow the RFC. Spammers and script kiddies are less likely to
> adhere to the requirements, which is where we get them.
>
> The proper course of action is to identify if the messages are
> legitimate and then refer the poster to their software's author to
> correct the issue.
>
> Once you start making exceptions for one, then you're going to be
> making exceptions for others and, as you say, this could lead to a
> nasty mess. Let's please not fix innd which isn't broken to fix a
> client that is.

They are legimately posted articles in my eyes, but maybe not others.
Switching to Diablo may be best to acommodate my unique needs. INN with
cleanfeed or pyclean does not scale well with my traffic, so this is another
push to the dark side.

Re: No colon-space in header field check in INN

<trjpa2$j086$1@news.trigofacile.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1384&group=news.software.nntp#1384

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.176-143-2-105.abo.bbox.fr!not-for-mail
From: iulius@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Fri, 3 Feb 2023 21:03:14 +0100
Organization: Groupes francophones par TrigoFACILE
Message-ID: <trjpa2$j086$1@news.trigofacile.com>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 3 Feb 2023 20:03:14 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176-143-2-105.abo.bbox.fr:176.143.2.105";
logging-data="622854"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.6.1
Cancel-Lock: sha1:n4CtYMOjlyiwkunWc2dJ8i+R3t0= sha256:duLI3NAM4H7GbBFTIft77S3Wf8AErQCI6oNfv68S0Tg=
sha1:vrF5lOOyMDwmBzeXjl/NbDjyehY= sha256:pbQSUDk1ZYcjV5jBYW6tupyOyVuoOmi2iY/sHbVGBFU=
In-Reply-To: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
 by: Julien ÉLIE - Fri, 3 Feb 2023 20:03 UTC

Hi Jesse,

> 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

Indeed, they shouldn't have been accepted by injecting agents.
Some posting agents send empty header fields, which are usually stripped
off by injecting agents before injecting the article.

> 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;
> }

If you're looking for a quick-and-dirty hack for that very header field,
I think the following check would do the trick (not tested):

@@ -644,10 +644,12 @@ ARTcheckheader(CHANNEL *cp, int size)
if ((colon = memchr(header, ':', size)) == NULL ||
!ISWHITE(colon[1])) {
if ((p = memchr(header, '\r', size)) != NULL)
*p = '\0';
+ if (strcasecmp(header, "User-Agent:") != 0 || colon[1] != '\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;

--
Julien ÉLIE

« – Ce n'était pas ma question.
– C'était p'têt pas vot'question, oui, mais c'est ma réponse ! »
(Georges Marchais répondant à Alain Duhamel)

Re: No colon-space in header field check in INN

<trk1ho$m21$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1390&group=news.software.nntp#1390

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.rehmer@blueworldhosting.com (Jesse Rehmer)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Fri, 3 Feb 2023 22:23:52 -0000 (UTC)
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Message-ID: <trk1ho$m21$1@nnrp.usenet.blueworldhosting.com>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <trjpa2$j086$1@news.trigofacile.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 3 Feb 2023 22:23:52 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="22593"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:A403JNVO6AtP3wAGc5vScGe/Row= sha256:0NprL9WbTIwlCI3cJ0LRXnT/dwftMPUsfvAGR5X1iEI=
sha1:ZIvGyJEUU7yIJV4FXLsgJm+Xryo= sha256:YxJO+q0G1vsk70pSFDvfpxBWVI9JPUWiM8HWfq6BPZs=
X-Usenapp: v1.26.1/d - Full License
 by: Jesse Rehmer - Fri, 3 Feb 2023 22:23 UTC

On Feb 3, 2023 at 2:03:14 PM CST, "Julien ÉLIE"
<iulius@nom-de-mon-site.com.invalid> wrote:

> Hi Jesse,
>
> If you're looking for a quick-and-dirty hack for that very header field,
> I think the following check would do the trick (not tested):
>
> @@ -644,10 +644,12 @@ ARTcheckheader(CHANNEL *cp, int size)
> if ((colon = memchr(header, ':', size)) == NULL ||
> !ISWHITE(colon[1])) {
> if ((p = memchr(header, '\r', size)) != NULL)
> *p = '\0';
> + if (strcasecmp(header, "User-Agent:") != 0 || colon[1] != '\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;

Thank you, Julien. After examining a larger sampling of these articles, they
appear to be noise and I'm not concerned about dropping them.

I will keep this code stashed away though, it may come in handy in the future
as lazy developers write more client software that isn't compliant.

Re: No colon-space in header field check in INN

<trecne$7fq$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1411&group=news.software.nntp#1411

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Wed, 1 Feb 2023 11:56:03 -0700
Organization: TNet Consulting
Message-ID: <trecne$7fq$1@tncsrv09.home.tnetconsulting.net>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
<87bkmdnzo2.fsf@hope.eyrie.org>
<20230201120350.09e5e61a@wibble.sysadmininc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 1 Feb 2023 18:57:50 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="7674"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <20230201120350.09e5e61a@wibble.sysadmininc.com>
Content-Language: en-US
 by: Grant Taylor - Wed, 1 Feb 2023 18:56 UTC

On 2/1/23 11:03 AM, Nigel Reed wrote:
> I wouldn't be happy about relaxing the checks or having a server feed
> in that does. They're there for a reason. Most legitimate users are
> going to follow the RFC. Spammers and script kiddies are less likely
> to adhere to the requirements, which is where we get them.
>
> The proper course of action is to identify if the messages are
> legitimate and then refer the poster to their software's author to
> correct the issue.
>
> Once you start making exceptions for one, then you're going to be
> making exceptions for others and, as you say, this could lead to a
> nasty mess. Let's please not fix innd which isn't broken to fix a
> client that is.

+10 to everything that Nigel said.

--
Grant. . . .
unix || die

Re: No colon-space in header field check in INN

<tre8f7$h9p$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1412&group=news.software.nntp#1412

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.alpha.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Wed, 1 Feb 2023 10:43:24 -0700
Organization: TNet Consulting
Message-ID: <tre8f7$h9p$1@tncsrv09.home.tnetconsulting.net>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
<87bkmdnzo2.fsf@hope.eyrie.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 1 Feb 2023 17:45:11 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251";
logging-data="17721"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <87bkmdnzo2.fsf@hope.eyrie.org>
Content-Language: en-US
 by: Grant Taylor - Wed, 1 Feb 2023 17:43 UTC

On 2/1/23 9:00 AM, Russ Allbery wrote:
> We do need to be pretty strict, since otherwise you can get into really
> nasty situations with ambiguous parses where two servers may disagree
> about something fundamental like the message ID of the article.

Agreed.

> I think if someone wanted to send a patch that added the ability to
> accept articles with headers that (a) weren't part of the protocol
> (so not Message-ID, Path, etc.), (b) specifically ended in a colon and
> a newline and no other variation, and (c) did not have a continuation,
> and it was configurable with the syntaxchecks setting and was off by
> default, that would be worth considering.

I think my biggest hang up is the idea that the header is defined
(present) but doesn't have a value. -- My personal opinion is that if
a header is there, then there should be /something/ in it.

I don't know if a single space following the colon is as important to
me. I'd be willing to accept -- what SMTP RFCs define as -- CFWS
sequences between the delimiting colon and header contents.

> I wouldn't want to relax the checks any farther than that. (It may
> be a bit difficult to wedge that into innd's code, though, since the
> above error happens at a fairly low level of the parse.)

Other than possibly allowing CFWS, I think that the headers should all
be well formed.

--
Grant. . . .
unix || die

Re: No colon-space in header field check in INN

<1121673478697475192.561257dog_cow-macgui.com@reader02.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1417&group=news.software.nntp#1417

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dog_cow@macgui.com (D Finnigan)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Tue, 7 Feb 2023 15:10:41 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <1121673478697475192.561257dog_cow-macgui.com@reader02.eternal-september.org>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 7 Feb 2023 15:10:41 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5eccca47a1d0ff5a3b77307fb878bffc";
logging-data="3987258"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rxhn6awzuOYNq4/o1byoh"
User-Agent: NewsTap/4.0.1 (iPhone/iPod Touch)
Cancel-Lock: sha1:v0F9oHLh31j4qU1UYlnw8i7ZmD0=
 by: D Finnigan - Tue, 7 Feb 2023 15:10 UTC

Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
> 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,

The colon is merely a separator between field name and field value. The
space afterward is only for human readability and is not mandated by the
RFCs. The whitespace following a colon is part of the field value and is
typically trimmed out.

Check the RFCs; people assume the space following a colon is mandatory, but
it's not.

Re: No colon-space in header field check in INN

<slrntu4tmk.1ce8k.jcb@bridgetown.inf.ed.ac.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1418&group=news.software.nntp#1418

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!usenet.inf.ed.ac.uk!.POSTED!not-for-mail
From: jcb@inf.ed.ac.uk (Julian Bradfield)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Tue, 7 Feb 2023 16:05:40 +0000 (UTC)
Lines: 28
Message-ID: <slrntu4tmk.1ce8k.jcb@bridgetown.inf.ed.ac.uk>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
<1121673478697475192.561257dog_cow-macgui.com@reader02.eternal-september.org>
NNTP-Posting-Host: bridgetown.inf.ed.ac.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: macpro.inf.ed.ac.uk 1675785940 11501 129.215.24.192 (7 Feb 2023 16:05:40 GMT)
X-Complaints-To: usenet@macpro.inf.ed.ac.uk
NNTP-Posting-Date: Tue, 7 Feb 2023 16:05:40 +0000 (UTC)
User-Agent: slrn/0.9.9p1 (Linux)
 by: Julian Bradfield - Tue, 7 Feb 2023 16:05 UTC

On 2023-02-07, D Finnigan <dog_cow@macgui.com> wrote:
> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
>> 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,
>
> The colon is merely a separator between field name and field value. The
> space afterward is only for human readability and is not mandated by the
> RFCs. The whitespace following a colon is part of the field value and is
> typically trimmed out.
>
> Check the RFCs; people assume the space following a colon is mandatory, but
> it's not.

I think you should check the RFCs before telling people off for not
doing so. Here is what the current RFC, RFC 5536, says (sec. 2.2):

o All agents MUST generate header fields so that at least one space
immediately follows the ':' separating the header field name and
the header field body (for compatibility with deployed software,
including NNTP [RFC3977] servers). News agents MAY accept header
fields that do not contain the required space.

Re: No colon-space in header field check in INN

<1437876612697479409.801055dog_cow-macgui.com@reader02.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1419&group=news.software.nntp#1419

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dog_cow@macgui.com (D Finnigan)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Tue, 7 Feb 2023 16:18:37 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <1437876612697479409.801055dog_cow-macgui.com@reader02.eternal-september.org>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <1121673478697475192.561257dog_cow-macgui.com@reader02.eternal-september.org> <slrntu4tmk.1ce8k.jcb@bridgetown.inf.ed.ac.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 7 Feb 2023 16:18:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5eccca47a1d0ff5a3b77307fb878bffc";
logging-data="4010192"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EryHZW62W0niM6n3wU/Ns"
User-Agent: NewsTap/4.0.1 (iPhone/iPod Touch)
Cancel-Lock: sha1:0plmMdZxIimoTOOM2KU8yxSztYU=
 by: D Finnigan - Tue, 7 Feb 2023 16:18 UTC

Julian Bradfield <jcb@inf.ed.ac.uk> wrote:
> On 2023-02-07, D Finnigan <dog_cow@macgui.com> wrote:
>> Jesse Rehmer <jesse.rehmer@blueworldhosting.com> wrote:
>>> 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,
>>
>> The colon is merely a separator between field name and field value. The
>> space afterward is only for human readability and is not mandated by the
>> RFCs. The whitespace following a colon is part of the field value and is
>> typically trimmed out.
>>
>> Check the RFCs; people assume the space following a colon is mandatory, but
>> it's not.
>
> I think you should check the RFCs before telling people off for not
> doing so. Here is what the current RFC, RFC 5536, says (sec. 2.2):
>

Ah, nicely done. I'd only looked at RFC 5322. Didn't know the NNTP one
differed.

Re: No colon-space in header field check in INN

<87lel9fm5w.fsf@hope.eyrie.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1420&group=news.software.nntp#1420

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.killfile.org!news.eyrie.org!.POSTED!not-for-mail
From: eagle@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Tue, 07 Feb 2023 08:57:47 -0800
Organization: The Eyrie
Message-ID: <87lel9fm5w.fsf@hope.eyrie.org>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
<1121673478697475192.561257dog_cow-macgui.com@reader02.eternal-september.org>
<slrntu4tmk.1ce8k.jcb@bridgetown.inf.ed.ac.uk>
<1437876612697479409.801055dog_cow-macgui.com@reader02.eternal-september.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="5552"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:RyhSUyvY69CrfQIXcCQeSPgfbek=
 by: Russ Allbery - Tue, 7 Feb 2023 16:57 UTC

D Finnigan <dog_cow@macgui.com> writes:

> Ah, nicely done. I'd only looked at RFC 5322. Didn't know the NNTP one
> differed.

In general, the Usenet article format RFC is compatible with email but
more restrictive, in some cases substantially more so. The email RFCs
still allow for a bunch of legacy syntax that historically was never
permitted by Usenet software and therefore is not allowed by the Usenet
article format RFC (like comments in the middle of email addresses, or no
space after the colon in headers).

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: No colon-space in header field check in INN

<ts050d$t2rn$1@news.trigofacile.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1424&group=news.software.nntp#1424

  copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.176-143-2-105.abo.bbox.fr!not-for-mail
From: iulius@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: No colon-space in header field check in INN
Date: Wed, 8 Feb 2023 13:36:29 +0100
Organization: Groupes francophones par TrigoFACILE
Message-ID: <ts050d$t2rn$1@news.trigofacile.com>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com>
<trjpa2$j086$1@news.trigofacile.com>
<trk1ho$m21$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 8 Feb 2023 12:36:29 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176-143-2-105.abo.bbox.fr:176.143.2.105";
logging-data="953207"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.6.1
Cancel-Lock: sha1:PpC8jNAJrLxod/zjXAfGZvcqnPs= sha256:yurN8emtkt3HlUznWeuQfXHgF11vSkJV05ds0a598l8=
sha1:LUf16FJSaEUGIV5akHW4pdEvkIs= sha256:jECa4r+r5P81g15EQs9PQiRGmBEKv51GYItrTX/Jhg8=
In-Reply-To: <trk1ho$m21$1@nnrp.usenet.blueworldhosting.com>
 by: Julien ÉLIE - Wed, 8 Feb 2023 12:36 UTC

Hi Jesse,

>> They are legimately posted articles in my eyes, but maybe not
>> others.
[...]

> After examining a larger sampling of these articles, they
> appear to be noise and I'm not concerned about dropping them.

OK, thanks for the confirmation!
Seems like to be a spam-filtering feature :)

I won't therefore take time to integrate a proper patch to allow empty
header fields for a few set of header fields that are parsed by servers
and clients (as proposed by Russ - not Path, Message-ID, Date,
Cancel-Lock, Distribution, Control, etc.).

> I will keep this code stashed away though, it may come in handy in the future
> as lazy developers write more client software that isn't compliant.

Do not hesitate to tell if you happen to find legitimate articles
rejected because of that check.

Also, does it concern many posters or always the same ones? Maybe there
are all using the same newsreader, which should directly be fixed.
If that's the case, they should be made aware of that bug in their
messages (by responding to them in the newsgroup or by mail if they
provide one).

--
Julien ÉLIE

« – Où vous croyez-vous ici ?
– Où je me trouve, je sais. » (Astérix)

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor