Article View: news.software.nntp
Article #79358Re: About 480 and 502 codes
From: Russ Allbery
Date: Tue, 26 Aug 2008 01:54
Date: Tue, 26 Aug 2008 01:54
106 lines
4369 bytes
4369 bytes
Julien ΓLIE <iulius@nom-de-mon-site.com.invalid> writes:
> By the way, I do not find the proper behaviour for that sequence:
>
> AUTHINFO USER test
> 381
> AUTHINFO USER newtest
> 381
> AUTHINFO PASS password
> 281
>
> Is it 381 for the first two ones?
Yes.
> And is it the last user which is used? ("newtest" for this example)
Yes. RFC 4643, section 2.3.2:
The server:
- MUST return a 381 response to AUTHINFO USER;
- MUST return a 482 response to AUTHINFO PASS if there is no cached
username;
- MUST use the argument of the most recent AUTHINFO USER for
authentication;
> AUTHINFO USER test
> 381
> GROUP news.software.nntp
> 480
> AUTHINFO PASS password
> 281
>
> Is it a valid sequence? Note that GROUP asks for authentication (480).
Server's discretion. It's permissible for that to be a valid sequence, or
the server may choose to reject it:
If the server requires both username and password, the former MUST be
sent before the latter. The server will need to cache the username
until the password is received; it MAY require that the password be
sent in the immediately next command (in other words, only caching
the username until the next command is sent).
> AUTHINFO USER test
> 381
> AUTHINFO SASL DIGEST-MD5
> 383
>
> Go on with this new AUTHINFO and forget about the first one?
Yup.
> Hey, what for:
>
> AUTHINFO USER test
> 381
> MODE READER
> 200
> AUTHINFO PASS password
> 281 or 482?
>
> *grin* (especially for innd)
Server's discretion. RFC 3977, section 5.3.2:
When the MODE READER command is issued, the server MAY reset its state
to that immediately after the initial connection before switching mode.
Resetting state means discarding all stored data, which would include the
cached username.
> Is is specified somewhere that the context is kept after MODE READER?
>
> Maybe MODE READER should return 502 if after AUTHINFO USER? (But it is
> specified somewhere?)
Until AUTHINFO PASS has been sent, authentication isn't complete, so the
server can still support MODE READER if it wishes. Basically, this is
entirely up to the server; I'd do whatever is the easiest to implement.
> Is MODE READER when the reader mode is already here returning 502 too?
> (otherwise it causes similar problems with the context)
If the server is not mode-switching, then the following apply:
o If it advertises the READER capability, it MUST return a 200 or
201 response with the same meaning as for the initial greeting; in
this case, the command MUST NOT affect the server state in any
way.
o If it does not advertise the READER capability, it MUST return a
502 response and then immediately close the connection.
Since nnrpd will advertise READER, the former applies. (So my previous
message was correct; nnrpd is in fact required by the standard to
implement MODE READER as a no-op.)
--
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.
Technical Details
Message-ID:
<87vdxosfr5.fsf@windlord.stanford.edu>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.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!news.stanford.edu!not-for-mailReferences:
<g8s5lo$7d1$1@news.trigofacile.com> <87prnxdged.fsf@windlord.stanford.edu> <g8thgh$84n$1@news.trigofacile.com> <87sksty31w.fsf@windlord.stanford.edu> <g8v5kh$i9d$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <87vdxosfr5.fsf@windlord.stanford.edu> Subject: Re: About 480 and 502 codes Date: Mon, 25 Aug 2008 18:54:06 -0700 From: Russ Allbery <rra@stanford.edu> References: <g8s5lo$7d1$1@news.trigofacile.com> <87prnxdged.fsf@windlord.stanford.edu> <g8thgh$84n$1@news.trigofacile.com> <87sksty31w.fsf@windlord.stanford.edu> <g8v5kh$i9d$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.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!headwall.stanford.edu!news.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 106 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.stanford.edu 1219715646 16232 171.64.19.147 (26 Aug 2008 X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:8GRVk9QTmMYc7dS5RFGOKrephKI=