Article View: news.software.nntp
Article #63132Re: NNTP and YENC
From: Bart Crane
Date: Tue, 14 Jan 2003 23:56
Date: Tue, 14 Jan 2003 23:56
84 lines
4377 bytes
4377 bytes
Jeremy <jeremy@exit109.com> wrote in message
news:1042509487.957651@ok-corral.gunslinger.net...
> Bart Crane <bcrane@iready.com> wrote:
>
> > NNTP-data has been, up to now, compatible with what DOS considers
> > a text-stream to be. Coincidence? Not at all. It was in fact
compatible
> > with what became the the ISO-C definition of a text-stream, which
> > forbids any ANSI-defined control-codes from appearing in the stream
> > (excepting for those few that have definition use for formatting text:
> > VTAB, HTAB, FF, CR and LF).
>
> NNTP data has never been compatible with this, it's just that you didn't
> encounter the incompatibility until now.
NNTP has always been compatible in this way. Why do you think
uuencode was made to produce only printable characters?
>
> Even if it were *supposed* to be compatible, trusting the server's data
> to be terminal-safe, or to not contain anything harmful when you take it
> and pass it off to library or system calls, is simply poor program design.
> Especially if you're dumping it to a terminal, you really must scrub it
> first -- that's the client's responsibility.
There is no design that circumvents this problem.
The problem is that a filter designed to process the data specifically
to ensure that "no bad stuff" gets through stops on End Of File when
1Ah is encountered.
A binary filter would require the intelligence of the decoder so that it
could escape the 1Ah properly, according to the context of the data
in which the 1Ah occurs.
newsget | decoder -escape | sed -f fixnewsg | decoder -decode
Although this is a workaround, whenever a new protocol is introduced
that utilizes control-codes, that decoding format must be supported by
the decoder, else a 1Ah can get through and stop the pipeline.
>
> > As you and whoever reads this can probably surmise, my whole
> > position is that the phrasing in RFC 977 that the "textual matter"
> > is "to be displayed on the user's terminal." -- i.e.: terminal control
> > codes must not appear in the data stream
>
> Your interpretation is based on assumptions as to what values a terminal
> considers special. Neither NNTP nor the server is in a position to know
> this; the client is.
Following the ANSI spec will get you compatibility with most
devices, if not all.
Following the ANSI spec will also allow compatibility with
text-mode processing on most non-Unix-based computers.
It does not seem reasonable to introduce a change in standard
practices that restricts the ability to process the data using stdio-
based utilities to Unix-based computers only, especially given
the NNTP authors' statements that the protocol was designed
to serve clients on a wide variety of hardware and software.
Thanks for the conversation, but I must say that you and just
about everyone else here seems absolutely determined to
ensure that only Unix-based systems are allowed to process
NNTP data using text-processing utilities.
It all seems like a no-brainer to me, text- vs. binary-streams
and all, but if you want to say that 1Ah is a perfectly valid text-
character on DOS because it is on Unix, you can say that!!!
Bart.
>
> --
> Jeremy | jeremy@exit109.com
Technical Details
Message-ID:
<sq1V9.77$2r2.63639@news.uswest.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!newsfeed.berkeley.edu!ucberkeley!feed.news.qwest.net!news.uswest.net.POSTED!not-for-mailReferences:
<BXLR9.432835$pN3.48082@sccrnsc03><1042007522.340079@ok-corral.gunslinger.net> <8d$Rtvs3cDD@3247.org> <aOIU9.101$qk2.63728@news.uswest.net> <1042509487.957651@ok-corral.gunslinger.net>Show Full Headers
Complete Article Headers
Message-ID: <sq1V9.77$2r2.63639@news.uswest.net> Subject: Re: NNTP and YENC Date: Tue, 14 Jan 2003 15:56:51 -0800 From: "Bart Crane" <bcrane@iready.com> References: <BXLR9.432835$pN3.48082@sccrnsc03><1042007522.340079@ok-corral.gunslinger.net> <8d$Rtvs3cDD@3247.org> <aOIU9.101$qk2.63728@news.uswest.net> <1042509487.957651@ok-corral.gunslinger.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!newsfeed.berkeley.edu!ucberkeley!feed.news.qwest.net!news.uswest.net.POSTED!not-for-mail Newsgroups: news.software.nntp Lines: 83 Organization: iReady Corp. X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 65.115.68.98 X-Trace: news.uswest.net 1042588440 65.115.68.98 (Tue, 14 Jan 2003 17:54:00 CST) NNTP-Posting-Date: Tue, 14 Jan 2003 17:54:00 CST