doc/hook-perl - response codes for authentication

Alexander Bartolich alexander.bartolich at gmx.at
Fri Dec 26 23:44:06 UTC 2008


Julien ÉLIE wrote:
> Hi Russ,
> 
>> I think we should fix the code in nnrpd so that it allows 403 in addition
>> to 481 and 281 and passes those codes along.
> 
> Done for both Perl and Python hooks.
> 
> %authcodes = ('allowed' => 281, 'denied' => 481, 'error' => 403);
> 
> Alexander will now be able to use:
> 
>    return (403, "Can't connect to MY-SQL");
> 
> and this exact message will show up.

Thank you very match. :-)

However, I'm still confused by the documentation. It now reads:

doc/hook-perl (revision 8260):
     The NNTP response code should probably be 281 (authentication
     successful), 481 (authentication unsuccessful), or 400 (server failure).
     If the code returned is anything other than 281, nnrpd will print an
     authentication error message and drop the connection and exit.

>> I'm not sure what to do about other codes -- it's tempting to map them 
>> all to 403 (on the grounds that the Perl filter is returning a code that
 >> it shouldn't)
> 
> Done.

So 400 would map to 403. Is that the reason hook-perl says 400?

>> but we may want to keep mapping 502 to 481 for backwards compatibility.
> 
> Also kept.

Anyway, I'm sticking with Ubuntu's INN 2.4.3+20070806-1 so the issue
is just theory right now.

Ciao

     Alexander.



More information about the inn-workers mailing list