doc/hook-perl - response codes for authentication
Julien ÉLIE
julien at trigofacile.com
Fri Dec 26 15:53:38 UTC 2008
Hi Russ,
> Actually, given that nnrpd closes the connection after a non-281 response,
> 400 is probably even better.
No, it is not how nnrpd currently works (in both 2.4 and 2.5 branches).
I tested that when I fixed Python hooks.
In fact, the samples nnrpd_auth.py and nnrpd_auth.pl contained:
%authcodes = ('allowed' => 281, 'denied' => 502);
which I changed in commit 8051 (September, 28th 20008) on CURRENT
(for 481 when 'denied').
But their use is not implemented. After both Perl and Python auth hooks,
if 281 is returned, then it is successful.
Upon receiving another code (be it 481, 502, 42 or 1200), authentication
fails and nnrpd returns 481, along with the error string provided.
return (12, 'Not allowed.');
will reply:
481 Not allowed.
nnrpd never closes the connection. Therefore, 400 should not be sent.
And it cannot be sent.
I proof-read doc/hook-python.pod but still have to do the same with
doc/hook-perl.pod which contains a few other mistakes.
--
Julien ÉLIE
« Certains hommes aiment tellement leur femme que, pour ne pas les user,
ils usent celle des amis. »
More information about the inn-workers
mailing list