🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #61779

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

#61779
From: Curt Welch
Date: Sun, 03 Nov 2002 20:27
96 lines
5461 bytes
andrew@supernews.com wrote:
> In article <20021103005855.983$iI@newsreader.com>, Curt Welch wrote:
> > andrew@supernews.com wrote:
> >> Older Diablo versions remove the CR, if any, from the input line and
> >> then check for "DOT LF" as the end-of-article delimiter.
> >
> > I don't have Diablo code laying around to check, but I'm pretty sure
> > I remeber seeing code that looked for "CR LF DOT CR LF", in the input
> > stream before the CR LF to LF translation happened so that wouldn't
> > explain it.
>
> I think you're confusing it with INN (which does do it that way)

Yeah, I must have confused it with something because I found an old copy
of Diablo (3.3) and it's not anything like the code I was thinking of.
I don't know what I was thinking of...

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.

And like you say, if you send it LF DOT LF it thinks that is a valid
end-of-stream marker.  That's just wrong.

> > And most servers today get DOT LF CR LF correct, and will send it as
> > DOT DOT LF CR LF.
>
> 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.  If the server decides
to drop the article because the server calls it "malformed", that's
ok, but if it failes to parse the NNTP data stream correctly, it's
just broken.  NNTP data streams end with CR LF DOT CR LF and _nothing_
else. LF DOT LF is not a valid end of datastream marker for NNTP even
though Diablo thinks it is.

> > And Diablo, old or new, will strip off that leading DOT
> > correctly when it's received.
> >
> > And when it's read from the spool file as DOT LF LF,
>
> the point is that Diablo will only put that in the spool file if what
> it actually received was DOT DOT CR? LF CR? LF. Even in the diablo4
> snapshot I have handy, when in non-wireformat mode DOT LF is treated as
> the end-of-article delimiter.

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

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 will incorrectly see the lone LF as an
end of line marker.  None the less, it will store that as:

   LF DOT LF LF

In it's spool file.  And when it sends it out again, it will also double
the dot, but then transform the LF to CR LF, so it becomes:

   CF LF DOT DOT CR LF CR LF

And from that point out, the article would be harmless (even though Diablo
corrupted it by adding an extra CR to it).

So the newer code of Diablo must be broken in a different way if the
article was to get trucated at that DOT somehow.

> > It's not surprising that this happened, I just don't think I understand
> > why it happened yet.  Someone needs to look at the Diablo code and see
> > if they can explain this....
>
> that's exactly what I'm doing.

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?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.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>

Show Full Headers
Complete Article Headers
Message-ID: <20021103152721.486$ih@newsreader.com>
Subject: Re: There's more (was Re: Someone is sending head-only articles out to Usenet????
Date: Sun, 03 Nov 2002 20:27:21 +0000
From: curt@kcwc.com (Curt Welch)
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>
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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com ,3pp6eQ8GT4LoI/xSEXq1-NxHF4aXFqw_XO5DCF8_QPeRaI
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 95