πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90065

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

#90065
From: Jesse Rehmer
Date: Fri, 03 Feb 2023 22:23
29 lines
2395 bytes
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.
Technical Details
Message-ID: <trk1ho$m21$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-mail
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <trjpa2$j086$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <trk1ho$m21$1@nnrp.usenet.blueworldhosting.com>
Subject: Re: No colon-space in header field check in INN
Date: Fri, 03 Feb 2023 22:23:52 +0000
From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com>
References: <trd09m$1369$1@nnrp.usenet.blueworldhosting.com> <trjpa2$j086$1@news.trigofacile.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: 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
Lines: 28