Article View: news.software.nntp
Article #84253Re: Empty folded line in header field (was Re: Censure ?)
From: Florian Schlichting
Date: Tue, 09 Aug 2011 21:15
Date: Tue, 09 Aug 2011 21:15
102 lines
5610 bytes
5610 bytes
Hi Julien,
>> Both pullnews and nnrpd would be expected to fix the header by
>> cutting the illegal line, no?
>
> pullnews is considered as a relaying agent here.
> 3.5. Duties of an Injecting Agent
>
> 2. It MUST reject any proto-article that does not have the proper
> mandatory header fields for a proto-article, that has Injection-
> Info or Xref header fields, that has a Path header field
> containing the "POSTED" <diag-keyword>, or that is not
> syntactically valid as defined by [RFC5536].
>
> So, NO, they are not expected to fix anything.
Ah, I see, not even as Injecting Agent... In that case, the whole
paragraph / if-clause ("Catch some of the more common problems...")
should probably be deleted, because all it does is "fix" a header line
that would otherwise render the article syntactically invalid that ought
to be rejected? But I think the waters are a bit muddy here with
pullnews' -H option that will just remove arbitrary headers...
>> pullnews seems to assume that a header line containing only whitespace
>> must be a broken transition to the message body, hence it can't find a
>> Message-ID. I think pullnews could be a little more intelligent about
>> this and have a look at the following line; if it's in "Headername:
>> header body" format, or another continuing line starting with
>> whitespace, then perhaps that can count as a sufficient indicator that
>> we're still in the header?
>
> Yes, I agree with you. Please note that it is not really a bug because
> pullnews follows this MAY:
>
> 3.6. Duties of a Relaying Agent
>
> 4. It SHOULD reject any article that does not include all the
> mandatory header fields. It MAY reject any article that contains
> header fields that do not have valid contents.
>
>
> However, I would tend not to follow this MAY. I reckon that the best
> thing to do is to accept the article with the parsing you suggest, and
> relay it without any modification.
If nothing in the article is going to be modified, no parsing needs to
be done in pullnews (the whole if-clause is unnecessary); and it is then
up to the daemon that pullnews feeds its articles to to decide whether
to accept (innd) or reject (nnrpd) the article. Makes sense?
>> Note that the first two chunks of this patch address a different issue
>> introduced to the 2.5 branch with the INN::Util::Shlock commit; things
>> seem to be a little different in the trunk branch
>
> Oh, many thanks Florian!
>
> It is true that commit 9100 is for INN 2.6.0 only, and shared (but only
> later) a common bit with INN 2.5.3 for the use of INN::Config and
> INN::Utils::Shlock packages.
> http://inn.eyrie.org/trac/changeset/9100
>
> Now fixed.
I am not sure...
The first three lines of pullnews.in are:
#! /usr/bin/perl -w
# use lib '@LIBPERLDIR@'; use INN::Config;
# If running inside INN, uncomment the above and point to INN::Config.
Running 'perl -wc pullnews.in' will tell you it "Can't locate
INN/Utils/Shlock.pm in @INC" - so it clearly cannot stay that way, and
it cannot be used independently from INN unaltered.
Now the makefile for both trunk and now also 2.5 runs 'fixscript
pullnews.in' (without -i), so the first three lines of the pullnews that
gets installed are:
#! /usr/bin/perl -w
use lib '/path/to/INN/lib/perl'; use INN::Config;
# If running inside INN, uncomment the above and point to INN::Config.
This helps with finding Shlock.pm, but the third line is bogus and the
change is not what one would expect from looking at the source of
pullnews.in - which is why I suggest changing those lines to the usual
sentence about fixscript, and perhaps a blank line.
> As pullnews is currently shipped with INN and, as far as I know, is not
> released in another package elsewhere, I think we can go on improving
> the script and using INN::Utils::Shlock; we may want to reconsider it in
> case somebody steps up and wants to maintain the script out of the INN
> tar ball. It is for instance what is done with pgpverify or signcontrol.
> However, without the use of shlock(), there is a portability issue.
I'm all with you here, particularly since using pullnews will in most
cases involve maintaining a news server as well. This may be different
for e.g. signcontrol, which can be useful for non-admins, too.
Florian
Technical Details
Message-ID:
<9admbvFpg5U1@mid.uni-berlin.de>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.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!not-for-mailReferences:
<mn.8c0c7db70f4125e7.121321@tellas.gr> <ivv2jt$273a$1@talisker.lacave.net> <4e231311$0$1752$426a74cc@news.free.fr> <j0i4vv$p8j$1@news.trigofacile.com> <j0i6d5$qt7$1@news.trigofacile.com> <9aco4fFv07U1@mid.uni-berlin.de> <j1rr3h$bpi$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <9admbvFpg5U1@mid.uni-berlin.de> Subject: Re: Empty folded line in header field (was Re: Censure ?) Date: Tue, 09 Aug 2011 21:15:43 +0000 From: Florian Schlichting <Florian.Schlichting@fu-berlin.de> References: <mn.8c0c7db70f4125e7.121321@tellas.gr> <ivv2jt$273a$1@talisker.lacave.net> <4e231311$0$1752$426a74cc@news.free.fr> <j0i4vv$p8j$1@news.trigofacile.com> <j0i6d5$qt7$1@news.trigofacile.com> <9aco4fFv07U1@mid.uni-berlin.de> <j1rr3h$bpi$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.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!not-for-mail Newsgroups: news.software.nntp Organization: Freie Universitaet Berlin Lines: 102 X-Trace: news.uni-berlin.de mQuQdxOiCUTO+eS9jxx1MgBf7SH36kBXSWIwR5AFmM2ejLfaso1CTj User-Agent: slrn/pre1.0.0-18 (Linux) X-Original-Bytes: 5388