🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
5 messages
5 total messages Started by Julien ÉLIE Mon, 11 Jul 2011 14:36
Update to signcontrol.py (v. 1.3.3)
#84192
Author: Julien ÉLIE
Date: Mon, 11 Jul 2011 14:36
25 lines
2113 bytes
Hi,

I have just released a new version of signcontrol.py (v. 1.3.3, 2011/07/11).

Web page (in French):
     http://www.trigofacile.com/divers/usenet/clefs/signcontrol.htm

Script and configuration file (commented in *English*):
     http://www.trigofacile.com/divers/usenet/clefs/signcontrol.py
     http://www.trigofacile.com/divers/usenet/clefs/signcontrol.conf


Only one change from the previous version:

* automatically generate an Injection-Date: header field, and sign it. 
It will prevent control articles from being maliciously reinjected into 
Usenet, and replayed by news servers compliant with RFC 5537 (that is to 
say without cutoff on the Date: header field when an Injection-Date: 
header field exists).

-- 
Julien ÉLIE

« La vie est un sommeil, l'amour en est le rêve et vous aurez vécu
   si vous avez aimé. » (Alfred de Musset)
Re: Update to signcontrol.py (v. 1.3.3)
#84191
Author: Russ Allbery
Date: Mon, 11 Jul 2011 16:35
19 lines
2076 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:

> Only one change from the previous version:

> * automatically generate an Injection-Date: header field, and sign it. It
> will prevent control articles from being maliciously reinjected into
> Usenet, and replayed by news servers compliant with RFC 5537 (that is to
> say without cutoff on the Date: header field when an Injection-Date:
> header field exists).

It's worth noting that once you've generated an Injection-Date header, you
can only then inject the resulting article via IHAVE, not POST.  (I don't
recall if signcontrol.py ever supported injecting via POST.)

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Update to signcontrol.py (v. 1.3.3)
#84193
Author: Julien ÉLIE
Date: Mon, 11 Jul 2011 16:53
44 lines
3085 bytes
Hi Russ,

> It's worth noting that once you've generated an Injection-Date header, you
> can only then inject the resulting article via IHAVE, not POST.  (I don't
> recall if signcontrol.py ever supported injecting via POST.)

Why wouldn't it be possible to POST an article that already has an
Injection-Date: header field?
I understand it is impossible for an Injection-Info: header field,
but I think it is possible for an Injection-Date: header field.

RFC 5537:
   If the proto-article already contains both Message-ID and Date header
   fields, posting agents MAY add an Injection-Date header field to that
   proto-article immediately before passing that proto-article to an
   injection agent.

It is the case for the control articles generated by signcontrol.py
(they contain signed Message-ID: and Date: header fields).



signcontrol.py does not actually post or inject articles.  It only
generates the files containing the articles to be posted/injected.
I then just manually run rnews/inews on the file.

I provide a little sample commented out in the script for those
who would like to automatically send the article.  I see that I wrote
it only for IHAVE :-)

    #print 'Or you can also try to send it with IHAVE.  If it fails, it means that the article'
    #print 'has not been sent.  You will then have to manually use rnews or a similar program.'
    #if raw_input('Do you want to try? (y/n) ') == 'y':
    #    import nntplib
    #    news_server = nntplib.NNTP(HOST, PORT, USER, PASSWORD)
    #    news_server.ihave(message_id, file_message + '.sig')
    #    news_server.quit()
    #    print 'The control article has just been sent!'

-- 
Julien ÉLIE

« La vie est un sommeil, l'amour en est le rêve et vous aurez vécu
  si vous avez aimé. » (Alfred de Musset)
Re: Update to signcontrol.py (v. 1.3.3)
#84194
Author: Russ Allbery
Date: Mon, 11 Jul 2011 17:01
25 lines
2392 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:

> Why wouldn't it be possible to POST an article that already has an
> Injection-Date: header field?
> I understand it is impossible for an Injection-Info: header field,
> but I think it is possible for an Injection-Date: header field.

> RFC 5537:
>    If the proto-article already contains both Message-ID and Date header
>    fields, posting agents MAY add an Injection-Date header field to that
>    proto-article immediately before passing that proto-article to an
>    injection agent.

> It is the case for the control articles generated by signcontrol.py
> (they contain signed Message-ID: and Date: header fields).

Oh, sorry, I'm wrong.  I forgot that we added that.  We'd gone back and
forth about it in the protocol discussion, and I'd misremembered what the
resolution was.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Update to signcontrol.py (v. 1.3.3)
#84196
Author: Julien ÉLIE
Date: Mon, 11 Jul 2011 17:54
19 lines
2489 bytes
Hi Russ,

>> RFC 5537:
>>     If the proto-article already contains both Message-ID and Date header
>>     fields, posting agents MAY add an Injection-Date header field to that
>>     proto-article immediately before passing that proto-article to an
>>     injection agent.
>
> We'd gone back and forth about it in the protocol discussion, and I'd
> misremembered what the resolution was.

Then it appears that the final resolution is well-thought and useful, 
and we hereby have a practical case of use!

-- 
Julien ÉLIE

« Les curés se consolent de n'être pas mariés quand ils entendent
   les femmes se confesser. » (Armand Salacroix)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads