Article View: news.software.nntp
Article #78765Cleanfeed binary logic
From: Steve
Date: Thu, 21 Feb 2008 20:53
Date: Thu, 21 Feb 2008 20:53
48 lines
2891 bytes
2891 bytes
Hi all,
I'm looking at the binary filtering in Cleanfeed and am confused by
the logic employed within the EMP MD5 segment of the code.
If a binary posting is made to a bin_allowed group, it will pass the
early is_binary check. So far so good.
When that posting hits the MD5 segment of code[1], the is_binary check
is only performed if fuzzy_md5 is true. This means that binary posts to
legitimate binary groups are subjected to MD5 filtering if fuzzy_md5 is
false (or fuzzy_max_length is exceeded).
This behaviour seems odd to me. I don't understand why the MD5 filter
should hash / reject binary articles. Before hacking around with it, I
thought it best to check there isn't a good reason for it being the way
it is.
[1] # create MD5 body checksum hash.
if ($config{do_md5} and not $gr{md5skip}
and not ($hdr{References} and $config{md5_skips_followups})
and (($config{md5_max_length}
and $lines < $config{md5_max_length})
or not $config{md5_max_length})
and $lines > 0 and ($lines > 2
or ($lines < 3 and $hdr{__BODY__} !~ /^\s{0,8}$/))) {
my $mbody;
if ($config{fuzzy_md5}
and (($config{fuzzy_max_length}
and $lines < $config{fuzzy_max_length})
or not $config{fuzzy_max_length})
and not is_binary()) {
$mbody = lc $hdr{__BODY__};
$mbody =~ s/^(?!http)\S{7,70}\r?$//mg;
$mbody =~ s/\r{3}.*$//mg;
$mbody =~ s/\s+$//;
$mbody =~ s/^[^\n]*\Z//m if $lines > 5;
$mbody =~ tr/a-z0-9//cd;
}
return reject('EMP (md5)', 'EMP')
if $MD5history->add(md5_hex($mbody || $hdr{__BODY__}));
}
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Technical Details
Message-ID:
<fpkobi$f95$1@news.mixmin.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.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!storethat.news.telefonica.de!telefonica.de!news-fra1.dfn.de!feeder.erje.net!news.mixmin.net!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <fpkobi$f95$1@news.mixmin.net> Subject: Cleanfeed binary logic Date: Thu, 21 Feb 2008 20:53:06 +0000 From: Steve <steve@mixmin.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.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!storethat.news.telefonica.de!telefonica.de!news-fra1.dfn.de!feeder.erje.net!news.mixmin.net!not-for-mail Newsgroups: news.software.nntp Organization: Mixmin Lines: 48 X-Complaints-To: abuse@mixmin.net NNTP-Posting-Date: Thu, 21 Feb 2008 20:53:06 +0000 (UTC) User-Agent: slrn/0.9.8.1pl1 (Debian)