🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #65112

Re: 2. or not 2. that is the question?

#65112
From: Curt Welch
Date: Thu, 01 May 2003 17:59
80 lines
4744 bytes
Faye Pearson <faye@clara.net> wrote:
> I'm receiving a takethis feed at the moment and I'm receiving something
> I wasn't expecting: unescaped dot at the beginning of the line.
>
> Should I fix this in transit? (+making compliant, -altering body)

No.  You shouldn't fix it for at least two reasons.  First, you can't fix
it correctly.  That's because you can't detect all the problems.  If
there's a client which is failing to escape lines with leading dots, you
can spot and fix the lines which started with a single dot, but if the same
article had lines with two dots, what do you do?  Assume the client missed
that one as well and change it to three?  It has to be done by the client
that injected the article and can never be accuratly fixed later, so
anything you attempt to do will only fuck the article up more.

Second, other people will attempt to interpret the article later, and any
changes you make to the article will only make their job harder (like
putting your footprints all over a crime scene).  A clasic unescaped dot
problem is the last line in uuencoded data.  Many uuencoding tools have
made the mistake of thinking uuencoded data doesn't need to be dot escaped
because they didn't realize that the last line can in fact begin with a
dot.  Or two dots, or three dots.  Some uudeocding tools for Usenet
actually have logic to try and spot and correct last line problems like
that.  Whatever logic they my use might be "broken" if you half-fix a post
before they get to it.

Also, a huge percenetate of the "broken dot" posts are spam produced by
spam tools that are too stupid to do anything correctly.  Spam filters can
make use of the broken leading dots to do there job better. If you clean up
the spam to make it look better, you risk helping spam get past a spam
filter.

So, stick with the golden rule of Usenet.  If you are feed an article,
either pass it along _exactly_ as you found it, or drop it.  Never modifiy
it.

> Drop it as bad? (+satisfies BOFH, -might not just be spam)

It's bad whether it's spam or not.  No one would fault you for dropping it
and your server would be far "cleaner" if you did.  Another common
corrupting is lines ending with CR CR LF.  Once again, it's 95% spam.  Feel
free to drop those as well.

The article in question I suspect passed though my server to get to the
rest of Usenet so you see my policy is to pass them along instead of
dropping them.

My server however will never let someone post an article with a dot problem
like that.

> Or, (as INN, Diablo and Typhoon have done) pass it on as it was? (could
> break for some unsuspecting client).
>
> Message-ID: <01050310.0839@yahoo.com>
>
> containing:
> .j8u/92Fc$13Clc<?w)JXF#turzaly<ji+sxi;mHE&k5%n-?zy
>
> How do clients react to unescaped dots?

It's harmless.  Either they are written to strip all leading dots and don't
bother to look at the next character, or they try to do something more
intelligent and only remove the leading dot if it is followed by a dot.
Either way, it's harmless.  The article is corrupted so you can't predict
how it will be displayed.  The bug doesn't cause any clients to crash that
I know of.

> DSRS for instance have trimmed the leading dot in the assumption that
> there will be another following.
>
> I can handle any of the above answers (I'm just throwing up a compliance
> warning to the log ATM)

My server cross posts all such articles to a special group (local.baddots).
The group has 45,000 articles in it.  This is a common problem.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20030501135937.530$7o@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!logbridge.uoregon.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <slrnbb28sg.ah7.faye@dude.noc.clara.net>

Show Full Headers
Complete Article Headers
Message-ID: <20030501135937.530$7o@newsreader.com>
Subject: Re: 2. or not 2. that is the question?
Date: Thu, 01 May 2003 17:59:37 +0000
From: curt@kcwc.com (Curt Welch)
References: <slrnbb28sg.ah7.faye@dude.noc.clara.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!logbridge.uoregon.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com ul2/En0x/AW6CV@@28s=2,Vpzbr3M0VM+fcfRAlfxeGVWo6
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: 79