Article View: news.software.nntp
Article #80334Re: INN and newgroups
From: Peter J Ross
Date: Tue, 10 Mar 2009 14:52
Date: Tue, 10 Mar 2009 14:52
73 lines
4771 bytes
4771 bytes
In news.admin.hierarchies on Mon, 9 Mar 2009 20:42:20 +0100, Julien
ΓLIE <iulius@nom-de-mon-site.com.invalid> wrote:
> 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 /[\`\/:;]/;
Does this check do anything useful that the per-component check
doesn't?
> 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 /--|__|\+\+./;
Do final -- and __ need to be allowed?
You might also consider blocking final +++ (or longer)
> # 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).
Why not reject such names instead of modifying them?
--
PJR :-)
slrn newsreader v0.9.9p1: http://slrn.sourceforge.net/
extra slrn documentation: http://slrn-doc.sourceforge.net/
newsgroup name validator: http://pjr.lasnobberia.net/usenet/validator
Technical Details
Message-ID:
<slrngrcvkl.skj.pjr@pjr.gotdns.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!xlned.com!feeder3.xlned.com!newsfeed.kpn.net!pfeed09.wxs.nl!news.motzarella.org!motzarella.org!pjr.motzarella.org!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> <gp3rgq$vod$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <slrngrcvkl.skj.pjr@pjr.gotdns.org> Subject: Re: INN and newgroups Date: Tue, 10 Mar 2009 14:52:05 +0000 From: Peter J Ross <pjr@example.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> <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!xlned.com!feeder3.xlned.com!newsfeed.kpn.net!pfeed09.wxs.nl!news.motzarella.org!motzarella.org!pjr.motzarella.org!not-for-mail Newsgroups: news.software.nntp,news.admin.hierarchies Organization: none Lines: 73 Reply-To: Peter J Ross <peadar.ruadh@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: news.eternal-september.org U2FsdGVkX19NuXUEmeYxkwHyGX82kdm+/zAhq7/6a3vZ0uHPWL6hzTmkkhUbZoujeEjtBZRrQvYgJaZeGrjkkf7WmjXsuXdPAqnzEJhoJQjRA6edq/Ef3gPbiAH0ROs5 X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Tue, 10 Mar 2009 15:03:02 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+iy2j2dopMBaR/LAPRzN6M Cancel-Lock: sha1:OrjaZ4CAl1vmAEifwBPiOEvrUo8= User-Agent: slrn/pre1.0.0-2/mm (Linux)