Article View: news.software.nntp
Article #80329Re: Cleanfeed vs. "meow" groups.
From: Steve
Date: Tue, 10 Mar 2009 11:01
Date: Tue, 10 Mar 2009 11:01
56 lines
3193 bytes
3193 bytes
On Mon, 9 Mar 2009 17:08:39 -0700, D. Stussy wrote in
Message-Id: <gp4b26$nl3$1@aux.snarked.org>:
> I don't think that the computation regarding "follow-up" groups vs.
> meow_ext_maxgroups is correct, unless the follow-up variable EXCLUDES meow
> groups. However, it appears that the follow-up variable INCLUDES meow
> groups, thus making meow_ext_maxgroups the TOTAL of ALL groups followups
> may be posted to, not the total of non-meow groups that followups may be
> posted to.
Phew, the meow code is a wonder of logic to try and follow. I'll
document my thoughts as I work through it for the sake of sanity
checking.
To begin we have:
$gr{meow}++ if $config{meow_ext_maxgroups}
and /$config{meow_groups}/o;
So $gr{meow} holds a count of the number of meow_groups in a post.
There is a bug here, we don't care if $config{meow_ext_maxgroups} is set
or not.
Next we have:
return reject('Too many newsgroups (meow)', 'Too many newsgroups')
if $gr{meow} and $gr{meow} != scalar @groups
and scalar @followups > $config{meow_ext_maxgroups};
The first chunk of logic checks if there is at least one meow group.
Next, if the entire distro is meow groups.
Last, if @followups exceeds the meow external groups limit.
You're correct, it's borked. A distro containing 4 groups, three of
which are meows and a single non-meow would get rejected.
$gr{meow} would be True.
$gr{meow} != scalar @groups would be True.
scalar @followups > $config{meow_ext_maxgroups} would be True.
I think the last logic should be:
(scalar @followups - $gr{meow}) > $config{meow_ext_maxgroups}
It would also be better to perform the "if $config{meow_ext_maxgroups}" check
in the reject section rather than the "count meow groups" section.
The end result would be:
$gr{meow}++ if $config{meow_groups} and /$config{meow_groups}/o;
....
return reject('Too many newsgroups (meow)', 'Too many newsgroups')
if $gr{meow}
and $gr{meow} != scalar @groups
and $config{meow_ext_maxgroups}
and (scalar @followups - $gr{meow}) > $config{meow_ext_maxgroups};
--
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:
<slrngrci3q.6et.steve@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!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news.mixmin.net!not-for-mailReferences:
<gp4b26$nl3$1@aux.snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <slrngrci3q.6et.steve@news.mixmin.net> Subject: Re: Cleanfeed vs. "meow" groups. Date: Tue, 10 Mar 2009 11:01:14 +0000 From: Steve <steve@mixmin.net> References: <gp4b26$nl3$1@aux.snarked.org> 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!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news.mixmin.net!not-for-mail Newsgroups: news.software.nntp Organization: Mixmin Lines: 56 NNTP-Posting-Host: b421ff0445b5e915dcbceaec1788b827 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@mixmin.net NNTP-Posting-Date: Tue, 10 Mar 2009 11:01:14 +0000 (UTC) User-Agent: slrn/pre1.0.0-2 (Linux)