Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The program isn't debugged until the last user is dead.


computers / news.software.nntp / Re: Relay : List of headers that should appear only once in an article?

SubjectAuthor
* Relay : List of headers that should appear only once in an article?Franck
+- Re: Relay : List of headers that should appear only once in anHenning Hucke
`* Re: Relay : List of headers that should appear only once in an article?Russ Allbery
 `* Re: Relay : List of headers that should appear only once in anFranck
  `* Re: Relay : List of headers that should appear only once in an article?Russ Allbery
   +- Re: Relay : List of headers that should appear only once in anFranck
   `* Re: Relay : List of headers that should appear only once in anJulien ÉLIE
    `* Re: Relay : List of headers that should appear only once in anFranck
     `- Re: Relay : List of headers that should appear only once in anJulien ÉLIE

1
Relay : List of headers that should appear only once in an article?

<6280a4d0$0$18038$426a74cc@news.free.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=763&group=news.software.nntp#763

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!aioe.org!pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed1-a.proxad.net!nnrp1-1.free.fr!not-for-mail
Date: Sun, 15 May 2022 08:59:27 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Newsgroups: news.software.nntp
Content-Language: fr
From: my...@mail.is.invalid (Franck)
Subject: Relay : List of headers that should appear only once in an article?
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 18
Message-ID: <6280a4d0$0$18038$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 15 May 2022 08:59:28 CEST
NNTP-Posting-Host: 128.90.160.99
X-Trace: 1652597968 news-3.free.fr 18038 128.90.160.99:50769
X-Complaints-To: abuse@proxad.net
 by: Franck - Sun, 15 May 2022 06:59 UTC

Hello,

When INJECTING an article, some headers should not appear and others
should appear only once. I do the checks in a way similar to INN
(nnrp/post.c) but with some additions, such as the format expected by
the header value.

When RELAYING an article, I am currently only testing the unicity of a
few headers that are useful for the relay but I would like to do better.

Is there an exhaustive list of headers that should only appear once that
I could test when receiving an article in a server to server exchange?

Does the declaration of headers in innd/innd.c match this requirement?

Thanks for your help.

Re: Relay : List of headers that should appear only once in an article?

<slrnt81tig.tu7.h_hucke+spam.news@romulus.aeon.icebear.cloud>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=764&group=news.software.nntp#764

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: h_hucke+...@newsmail.aeon.icebear.org (Henning Hucke)
Newsgroups: news.software.nntp
Subject: Re: Relay : List of headers that should appear only once in an
article?
Date: Sun, 15 May 2022 12:47:12 -0000 (UTC)
Organization: aeon: think longer than you thought before
Lines: 18
Message-ID: <slrnt81tig.tu7.h_hucke+spam.news@romulus.aeon.icebear.cloud>
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
Reply-To: Henning Hucke <h_hucke+news.reply(trick)@newsmail.aeon.icebear.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8-Bit
X-Trace: individual.net iaYku8q3uF0ry7deN9Zd7A73PqM35Qh+h91WuLwrwznCd3FtPV
X-Orig-Path: news.aeon.icebear.cloud!news1.aeon.icebear.cloud!.POSTED.romulus.aeon.icebear.cloud!not-for-mail
Cancel-Lock: sha1:635IRZRjNEGps1ImJ1x7XS4Bnx8= sha1:9Ybz5Gp9V3XQIkX+0Lupb/uGH0s=
Injection-Date: Sun, 15 May 2022 12:47:12 -0000 (UTC)
Injection-Info: sirius.aeon.icebear.cloud; posting-host="romulus.aeon.icebear.cloud:fd09:afca:b044:1:4ecc:6aff:fecf:5c8f";
logging-data="9710"; mail-complaints-to="abuse+news@aeon.icebear.cloud"
User-Agent: slrn/1.0.3 (Linux)
 by: Henning Hucke - Sun, 15 May 2022 12:47 UTC

On 2022-05-15, Franck <my@mail.is.invalid> wrote:

Hey Franck,

> [...]
> Is there an exhaustive list of headers that should only appear once that
> I could test when receiving an article in a server to server exchange?
> [...]

you (already?) know about RFCs (https://www.rfc-editor.org/) 5536 and
possibly 3977?

Best regards,
Henning
--
Applause, n:
The echo of a platitude from the mouth of a fool.
-- Ambrose Bierce

Re: Relay : List of headers that should appear only once in an article?

<87pmke7o5k.fsf@hope.eyrie.org>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=765&group=news.software.nntp#765

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!aioe.org!news.gegeweb.eu!gegeweb.org!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.eyrie.org!.POSTED!not-for-mail
From: eag...@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: Relay : List of headers that should appear only once in an article?
Date: Sun, 15 May 2022 09:31:51 -0700
Organization: The Eyrie
Message-ID: <87pmke7o5k.fsf@hope.eyrie.org>
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="8903"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:vvAWnSV3YfLjv6wR2w8DHj6fYjk=
 by: Russ Allbery - Sun, 15 May 2022 16:31 UTC

Franck <my@mail.is.invalid> writes:

> When RELAYING an article, I am currently only testing the unicity of a
> few headers that are useful for the relay but I would like to do better.

> Is there an exhaustive list of headers that should only appear once that
> I could test when receiving an article in a server to server exchange?

It is to some degree up to you. Relaying agents are allowed to be strict
about RFC 5536 compliance, or they're allowed to relay messages that don't
follow the standard but can still be processed.

I think it's generally better for Usenet to be fairly strict, but the
minimum is probably the headers that have direct protocol effect and which
therefore make the article ambiguous in ways that affect relaying if there
are duplicate headers, namely:

Control
Date
Distribution
Injection-Date
Message-ID
Newsgroups
Path
Supersedes

Not directly affecting relaying, but still probably nonsensical if
duplicated and thus probably worth rejecting because readers or serving
agents won't be able to make sense of the article if they're duplicated,
are:

Archive
Content-Transfer-Encoding
Content-Type
Expires
Followup-To
Injection-Info
MIME-Version
References

RFC 5536 also requires all of the following headers occur at most once:

Approved
Lines
Organization
Summary
User-Agent
Xref

but duplication is unlikely to cause major practical problems (although
some servers may honor Lines instead of count lines for themselves and get
confused, and duplicated Xref headers would cause serious problems when
copying article numbers from another server).

I may be forgetting some of the MIME headers since I didn't refresh my
memory from the relevant RFCs.

In some cases it's arguable that the article is still sensible if the
header is duplicated but both copies of the header have the same value
(the most common duplication error in my experience), but it's still
technically invalid to duplicate them.

The list in innd/innd.c controls what headers are exposed to posting
filters, so is sort of absurdly long and includes all kinds of things that
probably aren't directly relevant.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: Relay : List of headers that should appear only once in an article?

<62814c66$0$26331$426a74cc@news.free.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=766&group=news.software.nntp#766

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!paganini.bofh.team!pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-b.proxad.net!nnrp6-1.free.fr!not-for-mail
Date: Sun, 15 May 2022 20:54:30 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Subject: Re: Relay : List of headers that should appear only once in an
article?
Content-Language: fr
Newsgroups: news.software.nntp
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
<87pmke7o5k.fsf@hope.eyrie.org>
From: my...@mail.is.invalid (Franck)
In-Reply-To: <87pmke7o5k.fsf@hope.eyrie.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 130
Message-ID: <62814c66$0$26331$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 15 May 2022 20:54:31 CEST
NNTP-Posting-Host: 128.90.160.48
X-Trace: 1652640871 news-1.free.fr 26331 128.90.160.48:50872
X-Complaints-To: abuse@proxad.net
 by: Franck - Sun, 15 May 2022 18:54 UTC

Hi Russ,

Thanks for your explicit reply.

> It is to some degree up to you. Relaying agents are allowed to be strict
> about RFC 5536 compliance, or they're allowed to relay messages that don't
> follow the standard but can still be processed.

For the moment, I think to be strict with 5536.

> Control
> Date
> Distribution
> Injection-Date
> Message-ID
> Newsgroups
> Path
> Supersedes

Checked to be unique.

> Archive
> Content-Transfer-Encoding
> Content-Type
> Expires
> Followup-To
> Injection-Info
> MIME-Version
> References

Checked to be unique.

> Approved
> Lines
> Organization
> Summary
> User-Agent
> Xref

Checked to be unique.

What about :

- From
- Subject

- Archived-At
- Bcc
- Cc
- Keywords
- Reply-To
- Sender
- To

- Also-Control
- Article-Name
- Article-Updates
- Date-Received
- Nntp-Posting-Date
- Nntp-Posting-Host
- Posting-Version
- Relay-Version
- See-Also
- X-Complaints-To
- X-Trace

- Cancel-Key
- Cancel-Lock

PS : My software do not conform to 8315 for the moment.

> but duplication is unlikely to cause major practical problems (although
> some servers may honor Lines instead of count lines for themselves and get
> confused, and duplicated Xref headers would cause serious problems when
> copying article numbers from another server).

My software count lines for itself.

> I may be forgetting some of the MIME headers since I didn't refresh my
> memory from the relevant RFCs.

:-) I need to refresh mine also!

> In some cases it's arguable that the article is still sensible if the
> header is duplicated but both copies of the header have the same value
> (the most common duplication error in my experience), but it's still
> technically invalid to duplicate them.

Added to my to-list :-)

> The list in innd/innd.c controls what headers are exposed to posting
> filters, so is sort of absurdly long and includes all kinds of things that
> probably aren't directly relevant.

Ok, thanks for the explanations.

I do not manage filters with calls to perl or python but they can be set
for injection and/or relay (Some sort of postfilter and cleanfeed) and I
will use this (long) list to initialize a combo in the GUI part of the
software.

I implemented filters to be "fixed" or "user configurable".

Fixed ones are used to let the software be RFC/Draft compliant and
reject articles, like :

- "POSTED" in 'Path' => Article already seen.
- "World" in "Distribution",
- Number of occurences (21 message-ids max) in "References",
- Number of occurences of terms in "Injection-Info",
- Dates way to far in the past/future.

And so on...

Or to reject article based on a configuration option, like :

- FQDN/Path Entry in 'Path' => Article already seen.
- Max number of "Newsgroups", "Followup-to".

And so on...

Filters are also available to check the body of the article.

Configurable filters will be added ONLY when I'll code the GUI part of
the software.

Again,
Thanks for your help.

Re: Relay : List of headers that should appear only once in an article?

<87k0am7fcc.fsf@hope.eyrie.org>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=767&group=news.software.nntp#767

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!news.eyrie.org!.POSTED!not-for-mail
From: eag...@eyrie.org (Russ Allbery)
Newsgroups: news.software.nntp
Subject: Re: Relay : List of headers that should appear only once in an article?
Date: Sun, 15 May 2022 12:42:11 -0700
Organization: The Eyrie
Message-ID: <87k0am7fcc.fsf@hope.eyrie.org>
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
<87pmke7o5k.fsf@hope.eyrie.org>
<62814c66$0$26331$426a74cc@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org;
logging-data="8903"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:YBHOZlsdvnboUPUsYhYWlfDq+2s=
 by: Russ Allbery - Sun, 15 May 2022 19:42 UTC

Franck <my@mail.is.invalid> writes:

> What about :

> - From
> - Subject

Oh, sorry, yes, I knew I forgot something. Those should go into the
"readers are going to have a hard time understanding the message"
category of rejecting duplicates.

> - Archived-At
> - Bcc
> - Cc
> - Keywords
> - Reply-To
> - Sender
> - To

Reply-To is probably in the From and Subject territory.

None of the rest are Usenet headers, so I think this is just a question of
whether you want to generally impose a uniqueness rule on email headers
that happen to show up in Usenet articles. I think that's a reasonable
thing to do if you want, but you'll be dropping articles that will be
readable and not pose any practical problems.

(A Bcc header showing up in a Usenet post indicates that someone or
someone's software was very confused about how everything works.)

> - Nntp-Posting-Date
> - Nntp-Posting-Host
> - X-Complaints-To
> - X-Trace

These are all obsolete trace headers that should be replaced by
Injection-Info, but which are still in use in the wild. They're all
informational headers that don't carry any protocol meaning, so this is a
bit like the email header case. Maybe a slightly stronger argument for
uniqueness since they are relevant to abuse situations.

> - Also-Control

I'm fairly sure that this is thoroughly obsolete and not honored by
anything, although maybe I would be surprised. If it is honored, you'd
want it to be unique, but really nothing should honor it.

> - Article-Name
> - Article-Updates
> - Date-Received
> - Posting-Version
> - Relay-Version
> - See-Also

I think these are all just random headers that nothing uses. (Some of
them, like Relay-Version, are just so incredibly obsolete that nothing
will use them any more.)

> - Cancel-Key
> - Cancel-Lock

Oh, good call, RFC 8315 says these MUST NOT appear more than once, so may
as well reject messages with more than one of them as well.

>> In some cases it's arguable that the article is still sensible if the
>> header is duplicated but both copies of the header have the same value
>> (the most common duplication error in my experience), but it's still
>> technically invalid to duplicate them.

> Added to my to-list :-)

Note that for relaying you can't fix this (by dropping one of the
duplicates) since that's an unpermitted alteration of the article. You
have to either accept it or reject it.

On injection, it may not be a bad idea to toss duplicate header fields
that have the same content before rejecting articles that still have
duplicates. It's just a bit friendlier to broken posting agents; whether
you want to be friendly to such things is a bit of a judgment call.

> I do not manage filters with calls to perl or python but they can be set
> for injection and/or relay (Some sort of postfilter and cleanfeed) and I
> will use this (long) list to initialize a combo in the GUI part of the
> software.

I'm not sure I would. I don't think having a long list of headers that
you care about was the right design for INN's filters. It's just hard to
fix now.

I'd be more inclined to populate a dropdown with protocol headers that
people are likely to care about and then let people type in the names of
additional headers if they care.

--
Russ Allbery (eagle@eyrie.org) <https://www.eyrie.org/~eagle/>

Please post questions rather than mailing me directly.
<https://www.eyrie.org/~eagle/faqs/questions.html> explains why.

Re: Relay : List of headers that should appear only once in an article?

<62827359$0$9133$426a74cc@news.free.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=768&group=news.software.nntp#768

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp1-1.free.fr!not-for-mail
Date: Mon, 16 May 2022 17:52:57 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Subject: Re: Relay : List of headers that should appear only once in an
article?
Content-Language: fr
Newsgroups: news.software.nntp
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
<87pmke7o5k.fsf@hope.eyrie.org> <62814c66$0$26331$426a74cc@news.free.fr>
<87k0am7fcc.fsf@hope.eyrie.org>
From: my...@mail.is.invalid (Franck)
In-Reply-To: <87k0am7fcc.fsf@hope.eyrie.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 43
Message-ID: <62827359$0$9133$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 16 May 2022 17:52:57 CEST
NNTP-Posting-Host: 128.90.160.211
X-Trace: 1652716377 news-1.free.fr 9133 128.90.160.211:50227
X-Complaints-To: abuse@proxad.net
 by: Franck - Mon, 16 May 2022 15:52 UTC

Hi Russ,

Thank you for the reply, I have taken into account almost all of your
remarks concerning the headers.

>> Added to my to-list :-)
>
> Note that for relaying you can't fix this (by dropping one of the
> duplicates) since that's an unpermitted alteration of the article. You
> have to either accept it or reject it.

Of course.

> On injection, it may not be a bad idea to toss duplicate header fields
> that have the same content before rejecting articles that still have
> duplicates. It's just a bit friendlier to broken posting agents; whether
> you want to be friendly to such things is a bit of a judgment call.

Considered but not ranked #1 on my todo-list.

>> I do not manage filters with calls to perl or python but they can be set
>> for injection and/or relay (Some sort of postfilter and cleanfeed) and I
>> will use this (long) list to initialize a combo in the GUI part of the
>> software.
>
> I'm not sure I would. I don't think having a long list of headers that
> you care about was the right design for INN's filters. It's just hard to
> fix now.
>
> I'd be more inclined to populate a dropdown with protocol headers that
> people are likely to care about and then let people type in the names of
> additional headers if they care.

Sold.
I'll use "netnews" headers
(https://www.iana.org/assignments/message-headers/message-headers.xhtml)
to populate the dropdown.

Thanks for the help.

Re: Relay : List of headers that should appear only once in an article?

<t5u6ci$tf3f$1@news.trigofacile.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=769&group=news.software.nntp#769

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr!not-for-mail
From: iul...@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: Relay : List of headers that should appear only once in an
article?
Date: Mon, 16 May 2022 20:49:54 +0200
Organization: Groupes francophones par TrigoFACILE
Message-ID: <t5u6ci$tf3f$1@news.trigofacile.com>
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
<87pmke7o5k.fsf@hope.eyrie.org> <62814c66$0$26331$426a74cc@news.free.fr>
<87k0am7fcc.fsf@hope.eyrie.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 16 May 2022 18:49:54 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105";
logging-data="965743"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Cancel-Lock: sha1:dEQiJqpMeJnGiw6DaxMos2oYAiA= sha256:E/YeTPcRg9/L8CKbdOx9p8cyUBiAeejc7K8AQYtZSNI=
sha1:QRrxlVZrs8RYxq9bicaAhoMUiP0= sha256:+eI4KVmancyFnUBqg7l48pzlf+OOdIXGpdopis4FvlI=
In-Reply-To: <87k0am7fcc.fsf@hope.eyrie.org>
 by: Julien ÉLIE - Mon, 16 May 2022 18:49 UTC

Hi Franck and Russ,

>> When INJECTING an article, some headers should not appear and
>> others should appear only once. I do the checks in a way similar
>> to INN (nnrp/post.c)
Incidentally, I see that I once wrote at the end of the header table:

/* The Comments and Original-Sender header fields can appear more than
once
* in the headers of an article. Consequently, we MUST NOT put them here.
*/

So all the header fields listed there are supposed to appear only once
(and is tested by StripOffHeaders()).

>> - Article-Name

It is "Article-Names" (with an "s"). I mention it in case you
implemented it without the "s".

>> I do not manage filters with calls to perl or python but they can be set
>> for injection and/or relay (Some sort of postfilter and cleanfeed) and I
>> will use this (long) list to initialize a combo in the GUI part of the
>> software.
>
> I'm not sure I would. I don't think having a long list of headers that
> you care about was the right design for INN's filters. It's just hard to
> fix now.

Indeed!

https://github.com/InterNetNews/inn/issues/73
"Provide the entire article headers to innd filters, probably in a
special key in the hash similar to the BODY key."

This would have saved the need to manually add useful header fields.
At least, there aren't new ones every year to add! Hopefully it has
been a long time since the last addition (following a user request).

Amongst other header fields not mentioned in this thread, I would check
that X-PGP-Key and X-PGP-Sig are unique.

--
Julien ÉLIE

« Lots of people want to ride with you in the limo, but what you want is
someone who will take the bus with you when the limo breaks down. »
(Oprah Winfrey)

Re: Relay : List of headers that should appear only once in an article?

<6283320b$0$22065$426a74cc@news.free.fr>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=770&group=news.software.nntp#770

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-b.proxad.net!nnrp3-2.free.fr!not-for-mail
Date: Tue, 17 May 2022 07:26:33 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Subject: Re: Relay : List of headers that should appear only once in an
article?
Content-Language: fr
Newsgroups: news.software.nntp
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
<87pmke7o5k.fsf@hope.eyrie.org> <62814c66$0$26331$426a74cc@news.free.fr>
<87k0am7fcc.fsf@hope.eyrie.org> <t5u6ci$tf3f$1@news.trigofacile.com>
From: my...@mail.is.invalid (Franck)
In-Reply-To: <t5u6ci$tf3f$1@news.trigofacile.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 49
Message-ID: <6283320b$0$22065$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 17 May 2022 07:26:35 CEST
NNTP-Posting-Host: 128.90.160.66
X-Trace: 1652765195 news-1.free.fr 22065 128.90.160.66:50948
X-Complaints-To: abuse@proxad.net
 by: Franck - Tue, 17 May 2022 05:26 UTC

Hi Julien,

>  /* The Comments and Original-Sender header fields can appear more than
> once
>   * in the headers of an article.  Consequently, we MUST NOT put them
> here.
>   */
>
> So all the header fields listed there are supposed to appear only once
> (and is tested by StripOffHeaders()).

Since this table is part of the "nnrp.c" code, I assume that it is only
used for injection (POST) not for transit (IHAVE)? No?

I just want to offer the possibility (configurable) of rejecting
articles received from a feed with duplicate headers that don't really
make sense. Otherwise only primordial headers will be tested to be unique.

>>> - Article-Name
>
> It is "Article-Names" (with an "s").  I mention it in case you
> implemented it without the "s".

I checked for safety but it's just a typo in the message, it's
implemented as "Article-Names".

>   https://github.com/InterNetNews/inn/issues/73
> "Provide the entire article headers to innd filters, probably in a
> special key in the hash similar to the BODY key."
>
> This would have saved the need to manually add useful header fields.
> At least, there aren't new ones every year to add!  Hopefully it has
> been a long time since the last addition (following a user request).

My implementation allows to check the headers one by one EXCEPT if an
error has already been detected (since the article will obviously be
rejected).

Moreover, all the checks (filters or not) are only performed if the
article is not already in error, in order to avoid wasting system's
resources.

> Amongst other header fields not mentioned in this thread, I would check
> that X-PGP-Key and X-PGP-Sig are unique.

Thanks to mention them, will be added to be unique for transit.

Have nice day,
Franck

Re: Relay : List of headers that should appear only once in an article?

<t60rf7$vfhf$1@news.trigofacile.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=773&group=news.software.nntp#773

 copy link   Newsgroups: news.software.nntp
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.trigofacile.com!.POSTED.176.143-2-105.abo.bbox.fr!not-for-mail
From: iul...@nom-de-mon-site.com.invalid (Julien ÉLIE)
Newsgroups: news.software.nntp
Subject: Re: Relay : List of headers that should appear only once in an
article?
Date: Tue, 17 May 2022 21:01:59 +0200
Organization: Groupes francophones par TrigoFACILE
Message-ID: <t60rf7$vfhf$1@news.trigofacile.com>
References: <6280a4d0$0$18038$426a74cc@news.free.fr>
<87pmke7o5k.fsf@hope.eyrie.org> <62814c66$0$26331$426a74cc@news.free.fr>
<87k0am7fcc.fsf@hope.eyrie.org> <t5u6ci$tf3f$1@news.trigofacile.com>
<6283320b$0$22065$426a74cc@news.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 17 May 2022 19:01:59 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="176.143-2-105.abo.bbox.fr:176.143.2.105";
logging-data="1031727"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Cancel-Lock: sha1:wk2tYCd5j3+rZhYPbM7mWr5SZzQ= sha256:/v/nxhCp8jkdvrc2lieGHw1hpJlFFIy9aEA3uLNIyr0=
sha1:ys24wYhre7n2rUvLTuiV4bVbZOw= sha256:omps6KZzBey+Jnac4tvmcAmoA4cffuMST/iW4HdVt+s=
In-Reply-To: <6283320b$0$22065$426a74cc@news.free.fr>
 by: Julien ÉLIE - Tue, 17 May 2022 19:01 UTC

Bonsoir Franck,

>>   /* The Comments and Original-Sender header fields can appear more
>> than once
>>    * in the headers of an article.  Consequently, we MUST NOT put them
>> here.
>>    */
>>
>> So all the header fields listed there are supposed to appear only once
>> (and is tested by StripOffHeaders()).
>
> Since this table is part of the "nnrp.c" code, I assume that it is only
> used for injection (POST) not for transit (IHAVE)? No?

Yes, that's right. This is enforced at injection time.

> I just want to offer the possibility (configurable) of rejecting
> articles received from a feed with duplicate headers that don't really
> make sense. Otherwise only primordial headers will be tested to be unique.

Ah, OK. I thought you were looking for header fields that were supposed
to be unique (as you answered "Checked to be unique" in previous
discussions).
If you are looking for the primordial header fields that could be
harmful to other software, this is indeed not that list from nnrpd; the
discussion in this thread answered that.

>> Amongst other header fields not mentioned in this thread, I would
>> check that X-PGP-Key and X-PGP-Sig are unique.
>
> Thanks to mention them, will be added to be unique for transit.

You're welcome.

--
Julien ÉLIE

« – C'est une bonne situation ça, scribe ?
– Oh, c'est une situation assise. » (Astérix)

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor