πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83617

Re: Encoding of AUTHINFO USER/PASS arguments

#83617
From: Russ Allbery
Date: Wed, 03 Nov 2010 21:38
37 lines
2965 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> In the nntplib implementation of Python 3.2, a question is raised
> about how AUTHINFO USER/PASS arguments should be encoded.

> The initial implementation of RFC 4643 they do is to encode
> everything in UTF-8 because RFC 3977 mentions that "The character
> set for all NNTP commands is UTF-8." and RFC 4643 does not say
> anything about the encoding.
> Just a "user-pass-char = B-CHAR" without any explanation...

It's completely unspecified what encoding to use for AUTHINFO USER/PASS,
which is one of the problems fixed by SASL.  Clients should always use
SASL where possible because of things like this.  None of the legacy
authentication mechanisms (for protocols besides NNTP, as well) support
character sets.

If they have to fall back to AUTHINFO USER/PASS, they're unfortunately
just going to have to guess.  Most clients previously probably just sent
whatever bytes across the wire that corresponded to the local character
set encoding of the username and password.

In practice, using anything other than ASCII in passwords with AUTHINFO
USER/PASS is not going to be portable and won't work reliably.

> ** How do current news readers send them to news servers?
> ** And how news servers should decode them?

News servers probably can't do anything better than just accepting them as
a byte stream and doing a byte-by-byte comparison against local
configuration.

-- 
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: <8762we9jfs.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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.netcologne.de!ramfeed1.netcologne.de!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!usenet.stanford.edu!usenet-its.stanford.edu!not-for-mail
References: <iash7b$1vm$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <8762we9jfs.fsf@windlord.stanford.edu>
Subject: Re: Encoding of AUTHINFO USER/PASS arguments
Date: Wed, 03 Nov 2010 14:38:31 -0700
From: Russ Allbery <rra@stanford.edu>
References: <iash7b$1vm$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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.netcologne.de!ramfeed1.netcologne.de!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!usenet.stanford.edu!usenet-its.stanford.edu!not-for-mail
Newsgroups: news.software.nntp,news.software.readers
Organization: The Eyrie
Lines: 37
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: usenet-its.stanford.edu 1288820314 31943 171.67.225.134 (3 Nov 2010
X-Complaints-To: news@usenet-its.stanford.edu
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
Cancel-Lock: sha1:iagIOmLEsIJp7Mtqbx/FcuNeBOY=
X-Original-Bytes: 2687