Article View: news.software.nntp
Article #79944Re: UTF-8 in NNTP commands
From: Russ Allbery
Date: Sun, 28 Dec 2008 20:58
Date: Sun, 28 Dec 2008 20:58
46 lines
3249 bytes
3249 bytes
Julien ΓLIE <iulius@nom-de-mon-site.com.invalid> writes:
>> The standard says that clients shouldn't do that, which means that
>> servers can choose what to do if they receive something like that based
>> on the normal principles of being liberal in what one accepts.
>
> Implementations of this specification MUST NOT generate malformed or
> illegal sequences and SHOULD detect them and take some appropriate
> action.
Oh, hm, good point.
So we really *should* do something to remove invalid UTF-8, but since
UTF-8 support is new, this may break things.
> It looks as though the three first solutions should be used by an
> unconditionally compliant news server. But it would break a few
> commands like AUTHINFO USER/PASS with clients which do not implement RFC
> 3977. Therefore, it will probably be impossible to do anything with
> badly encoded arguments.
As loathe as I am to add even more options, I wonder if we could make
strictly enforcing valid UTF-8 an option. That would let people avoid
problems with malformed characters (which can in obscure situations
possibly become security issues, although I can't think of ones that would
affect NNTP off-hand) without breaking backward compatibility.
>> I think the AUTHINFO USER/PASS code should just preserve the legacy
>> approach of treating the input as a byte string, since newer clients
>> should hopefully switch to SASL anyway and that's the best opportunity
>> to change behavior here.
>
> Hmm... It is not said in RFC 4643. If someone implements a compliant
> news client, he has to encode strings in UTF-8. And AUTHINFO USER/PASS
> will not work with news servers!
Using non-ASCII characters in usernames and passwords in network protocols
is kind of a mess. :/ Even the saslprep effort turned into a significant
can of worms. It's one of those things no one thought about when
designing the original protocols.
--
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:
<87ocywm2za.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.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!newshub.sdsu.edu!newsfeed.stanford.edu!news.stanford.edu!not-for-mailReferences:
<gj8kvn$1aq$1@news.trigofacile.com> <87sko8m5wv.fsf@windlord.stanford.edu> <gj8o6p$5vh$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <87ocywm2za.fsf@windlord.stanford.edu> Subject: Re: UTF-8 in NNTP commands Date: Sun, 28 Dec 2008 12:58:17 -0800 From: Russ Allbery <rra@stanford.edu> References: <gj8kvn$1aq$1@news.trigofacile.com> <87sko8m5wv.fsf@windlord.stanford.edu> <gj8o6p$5vh$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.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!newshub.sdsu.edu!newsfeed.stanford.edu!news.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 46 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 1230497897 15190 171.67.225.134 (28 Dec 2008 X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:JEIa2Bs32Xq8/EI7sxTrbjmSXoM=