πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79355

Re: About 480 and 502 codes

#79355
From: Russ Allbery
Date: Mon, 25 Aug 2008 20:45
42 lines
3114 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> Hi Russ,
>
>>   After a successful authentication, the client MUST NOT issue another
>>   AUTHINFO command in the same session.  A server MUST NOT return the
>>   AUTHINFO capability in response to a CAPABILITIES command, and a
>>   server MUST reject any subsequent AUTHINFO commands with a 502
>>   response.  Additionally, the client MUST NOT issue a MODE READER
>>   command after authentication, and a server MUST NOT advertise the
>>   MODE-READER capability.

> What happens it the client issues a MODE READER command after
> authentication?  502?

That's an intriguing question.  I hadn't realized the implications of
that.  Section 2.1:

   A server MUST implement at least one of the AUTHINFO USER or AUTHINFO
   SASL commands in order to advertise the "AUTHINFO" capability label in
   response to the CAPABILITIES command ([NNTP] Section 5.2).  However,
   this capability MUST NOT be advertised after successful authentication
   (see Section 2.2).  This capability MAY be advertised both before and
   after any use of the MODE READER command ([NNTP] Section 5.3), with the
   same semantics.

So AUTHINFO may be advertised before and after MODE READER, but once a
client authenticates, it may not issue MODE READER, and the server must
not advertise MODE READER.  So the client therefore has to choose
up-front; if it's going to do MODE READER, it has to do so prior to
authentication, and once authentication has happened, the MODE READER
command must be suppressed.

Yes, I think 502 is the correct return code in this case for MODE READER
after authentication, since you have to terminate and reopen the
connection to be able to do that.

-- 
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: <87iqtoddt6.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-mail
References: <g8s5lo$7d1$1@news.trigofacile.com> <87prnxdged.fsf@windlord.stanford.edu> <g8thgh$84n$1@news.trigofacile.com> <87sksty31w.fsf@windlord.stanford.edu> <g8v1mh$do2$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <87iqtoddt6.fsf@windlord.stanford.edu>
Subject: Re: About 480 and 502 codes
Date: Mon, 25 Aug 2008 13:45:09 -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> <g8v1mh$do2$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: 42
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 1219697109 23565 171.64.19.147 (25 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:h/0j9r6sFH99YxSrHN/hCZF0TgE=