🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #60780

Re: Reminder to filter misplaced yEnc with other binaries

#60780
From: J.B. Moreno
Date: Sun, 29 Sep 2002 23:31
31 lines
2174 bytes
In article <ylu1k8my0e.fsf@windlord.stanford.edu>, 
 Russ Allbery <rra@stanford.edu> wrote:

>     if ($hdr{__BODY__} =~ m%^=ybegin (.+)$%m) {
>         local $_ = $1;
>         if (/line=/ && /size=/ && /name=/) {
>             return 1;
>         }
>     }
> 
> using INN's filters.  This has an unfortunate possibility of false
> positives on posts discussing yEnc if a particularly complete example is
> included without indenting the =ybegin line, so I'll likely add some
> additional checks at some point to avoid those.

Not sure how the filters work, but would 
    if ($hdr{__BODY__} =~ m%^=ybegin (.+)\n.{128,129}$%m) {
        local $_ = $1;
        if (/line=/ && /size=/ && /name=/) {
            return 1;
        }
    }

avoid the problem -- the vast majority of yEnc post use a line of 128
which allows for a line length of 128 or 129, so unless it's a *really*
complete or extremely small binary, the next line ought to one or the
other.

-- 
J.B. Moreno
Technical Details
Message-ID: <290920021931093634%planb@newsreaders.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!xmission!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!newshosting.com!news-xfer1.atl.newshosting.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news2.newsreader.com!flame.newsreader.com!planb
References: <ylu1k8my0e.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <290920021931093634%planb@newsreaders.com>
Subject: Re: Reminder to filter misplaced yEnc with other binaries
Date: Sun, 29 Sep 2002 19:31:09 -0400
From: "J.B. Moreno" <planb@newsreaders.com>
References: <ylu1k8my0e.fsf@windlord.stanford.edu>
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!xmission!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!newshosting.com!news-xfer1.atl.newshosting.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news2.newsreader.com!flame.newsreader.com!planb
Newsgroups: news.software.nntp
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
User-Agent: Thoth/1.6.0 (Carbon/OS X)
X-Face: ]lUBtDImSD_`E"<*ZgyJUoCT\=CdRLFX4qCMLK[xy^L7v|uX|f8`cFDd*PaH8
  N*x>d^h
X-Trace: flame.newsreader.com JCwkSn6HV.s8YDZnbYzDQDCV+irMsa+YzCyYlRUK-aM9/w
Lines: 30