Article View: news.software.nntp
Article #82698Re: unrelated possible bug with C flag?
From: D. Stussy
Date: Thu, 28 Jan 2010 21:27
Date: Thu, 28 Jan 2010 21:27
75 lines
4388 bytes
4388 bytes
"Julien ΓLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:hjsinn$cst$1@news.trigofacile.com...
> Hi D. Stussy,
>
> >> + for (i = 0, p = HDR(HDR__FOLLOWUPTO) ; p != NULL && *p != '\0'; p++)
{
> >
> > I agree with changing the [outer] for-loop conditional to just "p !=
NULL"
>
> Even with nothing at all because if *p is '\0', the loop will end after
> the search of ",".
>
> > I've been busy with work the past 3 days, but thought about this. I
would
> > have replaced the "continue" with "p = strchr( ++p, ',')" and remove
the
> > p++ from the loop-closure. As we're only counting, I don't think we
have
> > to worry about whitespace.
for (i = 0, p = HDR(HDR__FOLLOWUPTO) ; p != NULL ; i++)
p = strchr( ++p, ',');
is ALL that is necessary to arrive at a preliminary proper count of "i" =
groups specified, given a SYNTACTICALLY correct "Followup-To:" header.
Adjustment for (i=1 and "poster") or (i=0) follows.
> The problem is that we do not properly see:
>
> Followup-To: poster,
> Followup-To: news.group1,,news.group2
>
> The first one would not be parsed as a real "poster" and the second one
> would count 3 groups.
Neither of these should be accepted in the first place. A "null group"
isn't valid.
> The only thing that is not handled here is newsgroups mentioned twice...
>
> Followup-To: poster , poster
> Followup-To: news.group1, news.group1 , news.group2
I agree that the above may be problems. The whitespace ISN'T a problem
when we're merely COUNTING groups.
> > I think that RFC 1036 made it clear: "poster", with its special
meaning,
> > may only appear alone. Therefore, we don't have to check to see if
it's
> > specified in the string; only that it IS the string of the
"newsgroups:"
> > header data field. I don't see any change in RFC 5536 to this
behavior.
>
> I am following here the law "be liberal in what you accept" because innd
> is not an injecting agent. We will not reject the article because of an
> error in the syntax of the Followup-To: header.
No argument with the principle. However, if we're at this point, we're
dealing with articles that have already been accepted into the spool. This
is not the place to deal with invalid syntax. That should be done in NNRPD
(for locally submitted articles) and elsewhere in INN for articles from
peers.
> > the varying client responses are [responses] to a condition that
> > never should have arisen.
>
> They are liberal in what they accept too. And try to do their best.
Your suggested patch is trying to perform syntax checking too late in the
process. These are articles already accepted and stored in the spool.
Technical Details
Message-ID:
<hjsvgf$vko$1@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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!news.glorb.com!news-xfer.nntp.sonic.net!news.snarked.org!not-for-mailReferences:
<hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.com> <hjar9t$mq$1@snarked.org> <hjnpm4$f5l$1@news.trigofacile.com> <hjq8r4$s5h$1@news.trigofacile.com> <hjqp78$iis$1@snarked.org> <hjsinn$cst$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <hjsvgf$vko$1@snarked.org> Subject: Re: unrelated possible bug with C flag? Date: Thu, 28 Jan 2010 13:27:38 -0800 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> References: <hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.com> <hjar9t$mq$1@snarked.org> <hjnpm4$f5l$1@news.trigofacile.com> <hjq8r4$s5h$1@news.trigofacile.com> <hjqp78$iis$1@snarked.org> <hjsinn$cst$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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!news.glorb.com!news-xfer.nntp.sonic.net!news.snarked.org!not-for-mail Newsgroups: news.software.nntp Lines: 75 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> NNTP-Posting-Host: 71.118.51.220 X-Trace: snarked.org 1264714064 32408 71.118.51.220 (28 Jan 2010 21:27:44 GMT) X-Complaints-To: newsmaster+complaints@snarked.org NNTP-Posting-Date: Thu, 28 Jan 2010 21:27:44 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478