🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #61780

Re: There's more (was Re: Someone is sending head-only articles out to Usenet????

#61780
From: Andrew - Supernews
Date: Mon, 04 Nov 2002 01:03
72 lines
4843 bytes
In article <20021103152721.486$ih@newsreader.com>, Curt Welch wrote:
> This 3.3 version of Diablo is seriously broken when it comes to it's
> ability to correctly parse an NNTP stream.  It thinks NL terminates
> lines on NNTP, so if you send it X LF DOT DOT LF it will strip that
> first DOT off.  That's just wrong.

Since that's not a valid NNTP stream, then there is no "correct" way to
parse it. Treating a bare LF as a line delimiter is just as good a way of
handling the incorrectness as any other (_especially_ on an initial post,
since clients screw that one up on a regular basis).

>> If the server receives DOT LF CR LF via nntp (rather than via a local
>> file), then the article is already malformed and anything the server does
>> with it is wrong (at least potentially).
> 
> You can debate the issue of whether the "article" is malformed, but the
> NNTP data stream is in no way malformed.  Transfering data over NNTP
> is very simple and very well defined and DOT LF CR LF is not invalid
> for NNTP and should not break any NNTP server.

It's malformed BECAUSE THE DOT HAS NOT BEEN ESCAPED. A dot at the start of
a line MUST be doubled, regardless of what you believe about bare LFs.

As for the bare-LF issue, RFC 977 is not explicit on the subject, so we
turn to the reference implementation, and find that it always treats LF
as a line terminator, with or without the CR. The draft replacement for
977 explicitly forbids either CR or LF appearing alone. So where you get
this insane idea of yours about bare LFs being valid, I have no idea; you
may think that things would work better that way, but the actual real
implementations and documentation disagrees.

> In the code I'm looking, I don't understand where the bug is.  The
> orginal article as far as I can tell, had a
> 
>    CR LF DOT LF CR LF
> 
> sequence in it.  Any normal server will send that by doubling the DOT as:
> 
>    CF LF DOT DOT LF CR LF

you're missing the point that the dot-doubling is _not_ done when the
article was stored on disk in wire format (because the sending server is
presumed to have done it). hermes.visi.com had stored on its spool a
wireformat article containing CR LF DOT LF CR LF, which it had received
exactly like that from easynews (and recent Diablo in wireformat mode
does not recognise DOT LF as end-of-article). If it tries to send that out
to another Diablo running in non-wireformat mode, or to a reference NNTP,
then the article _will_ be truncated at that point (because it will be sent
exactly as it was stored).

> With the 3.3 code I have, Diablo won't see that as an end-of-article marker
> because of the double dot.

but it won't be sent a double dot.

> So what happens with the code you are looking at when Diablo receives:
> 
>   CR LF DOT DOT LF CR LF
> 
> over the NNTP stream?
> 
> When it's in "wire format" does it store the double dot to the file or not?

the whole point of "wire format" is that you store exactly what you receive,
and exactly what you're going to send out again, without any changes to
either the line endings or the dot-escapes. So it stores the double dot in
the spool.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Technical Details
Message-ID: <slrnasbhrd.8p9.andrew+nonews@trinity.supernews.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed-west.nntpserver.com!hub1.meganetnews.com!nntpserver.com!telocity-west!TELOCITY!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
References: <20021102220425.532$Ov@newsreader.com> <us954gpfjs492a@corp.supernews.com> <20021102222437.838$Mm@newsreader.com> <slrnas967a.8p9.andrew+nonews@trinity.supernews.net> <20021102225642.902$eT@newsreader.com> <slrnas98f6.8p9.andrew+nonews@trinity.supernews.net> <20021102232508.136$0f@newsreader.com> <aq2alp$61b2a$1@ID-80930.news.dfncis.de> <20021103001847.653$nw@newsreader.com> <slrnas9drt.8p9.andrew+nonews@trinity.supernews.net> <20021103005855.983$iI@newsreader.com> <slrnas9fja.8p9.andrew+nonews@trinity.supernews.net> <20021103152721.486$ih@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrnasbhrd.8p9.andrew+nonews@trinity.supernews.net>
Subject: Re: There's more (was Re: Someone is sending head-only articles out to Usenet????
Date: Mon, 04 Nov 2002 01:03:41 -0000
From: Andrew - Supernews <andrew+nonews@supernews.com>
References: <20021102220425.532$Ov@newsreader.com> <us954gpfjs492a@corp.supernews.com> <20021102222437.838$Mm@newsreader.com> <slrnas967a.8p9.andrew+nonews@trinity.supernews.net> <20021102225642.902$eT@newsreader.com> <slrnas98f6.8p9.andrew+nonews@trinity.supernews.net> <20021102232508.136$0f@newsreader.com> <aq2alp$61b2a$1@ID-80930.news.dfncis.de> <20021103001847.653$nw@newsreader.com> <slrnas9drt.8p9.andrew+nonews@trinity.supernews.net> <20021103005855.983$iI@newsreader.com> <slrnas9fja.8p9.andrew+nonews@trinity.supernews.net> <20021103152721.486$ih@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed-west.nntpserver.com!hub1.meganetnews.com!nntpserver.com!telocity-west!TELOCITY!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: news.software.nntp
Organization: http://www.supernews.com - all your nntp are belong to us
Reply-To: andrew@supernews.com
User-Agent: slrn/0.9.7.4 (FreeBSD)
X-Complaints-To: abuse@supernews.com
Lines: 71