Article View: news.software.nntp
Article #80307Re: INN and newgroups
From: Julien ÉLIE
Date: Mon, 09 Mar 2009 19:42
Date: Mon, 09 Mar 2009 19:42
64 lines
4226 bytes
4226 bytes
Hi Russ,
>> 2) Instead of accepting messages that don't have the line (and using "No
>> description."), outright reject those.
>
> This, however, I think might be a good idea.
Done. It will be shipped with INN 2.5.0-RC1.
I also reactivated (and proof-read) the check on group names (the function
was defined but the way it was called implied it was never called):
# Check the group name. This is partially derived from C News.
# Some checks are commented out if I think they're too strict or
# language-dependent. Your mileage may vary.
sub checkgroupname {
local $_ = shift;
# Whole-name checking.
return 'Empty group name' if (! $_);
return 'Whitespace in group name' if /\s/;
return 'Unsafe group name' if /[\`\/:;]/;
return 'Bad dots in group name' if /^\./ or /\.$/ or /\.\./;
# return 'Group name does not begin/end with alphanumeric'
# if (/^[a-zA-Z0-9].+[a-zA-Z0-9]$/;
return 'Group name begins in control., example., junk. or to.'
if /^(?:control|example|junk|to)\./;
# return 'Group name too long' if length $_ > 128;
my @components = split(/\./);
# Prevent alt.a.b.c.d.e.f.g.w.x.y.z...
return 'Too many components' if $#components > 9;
# Per-component checking.
for (my $i = 0; $i <= $#components; $i++) {
local $_ = $components[$i];
return 'All-numeric name component' if /^[0-9]+$/;
# return 'Name component starts with non-alphanumeric' if /^[a-zA-Z0-9]/;
# return 'Name component does not contain letter' if not /[a-zA-Z]/;
return "`all' or `ctl' used as name component" if /^(?:all|ctl)$/;
# return 'Name component longer than 30 characters' if length $_ > 30;
return 'Uppercase letter(s) in name' if /[A-Z]/;
return 'Illegal character(s) in name' if /[^a-z0-9+_\-]/;
# Sigh, c++ etc. must be allowed.
return 'Repeated punctuation in name' if /--|__|\+\+./;
# return 'Repeated component(s) in name' if ($i + 2 <= $#components
# and $_ eq $components[$i + 1] and $_ eq $components[$i + 2]);
}
return '';
}
If you have suggestions for these checks, feel free to tell.
Note that a whitespace in the group name or uppercase latters normally
cannot be found here (INN lowercases the group name sooner in the script).
--
Julien ÉLIE
« La moitié des hommes politiques sont des bons à rien.
Les autres sont prêts à tout. » (Coluche)
Technical Details
Message-ID:
<gp3rgq$vod$1@news.trigofacile.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.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mailReferences:
<AR039.000000.000@uce.gov> <gos8gd$6re$1@news.albasani.net> <808wnhyjgl.fsf@banana.shacknet.nu> <got324$cqs$1@aux.snarked.org> <gotdup$k04$3@news.albasani.net> <goum3q$sfs$2@aux.snarked.org> <gouo07$hv2$1@news.trigofacile.com> <govsh5$dfa$1@aux.snarked.org> <gp06kc$uj6$1@news.trigofacile.com> <gp17ks$ncv$2@aux.snarked.org> <87ljrfu5ty.fsf@windlord.stanford.edu> <gp1ai5$nsj$1@aux.snarked.org> <874oy3u3t3.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <gp3rgq$vod$1@news.trigofacile.com> Subject: Re: INN and newgroups Date: Mon, 9 Mar 2009 20:42:20 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <AR039.000000.000@uce.gov> <gos8gd$6re$1@news.albasani.net> <808wnhyjgl.fsf@banana.shacknet.nu> <got324$cqs$1@aux.snarked.org> <gotdup$k04$3@news.albasani.net> <goum3q$sfs$2@aux.snarked.org> <gouo07$hv2$1@news.trigofacile.com> <govsh5$dfa$1@aux.snarked.org> <gp06kc$uj6$1@news.trigofacile.com> <gp17ks$ncv$2@aux.snarked.org> <87ljrfu5ty.fsf@windlord.stanford.edu> <gp1ai5$nsj$1@aux.snarked.org> <874oy3u3t3.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.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mail Newsgroups: news.software.nntp,news.admin.hierarchies Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 64 NNTP-Posting-Host: aaubervilliers-151-1-69-80.w81-48.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1236627803 32525 81.48.72.80 (9 Mar 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Mon, 9 Mar 2009 19:43:23 +0000 (UTC) In-Reply-To: <874oy3u3t3.fsf@windlord.stanford.edu> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049