Article View: news.software.nntp
Article #79943Re: UTF-8 in NNTP commands
From: Julien ÉLIE
Date: Sun, 28 Dec 2008 20:39
Date: Sun, 28 Dec 2008 20:39
58 lines
3425 bytes
3425 bytes
Hi Russ,
> 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. This could include the following:
o Generating a 501 response code.
o Replacing such sequences by the sequence %xEF.BF.BD, which encodes
the "replacement character" U+FFFD.
o Closing the connection.
o Replacing such sequences by a "guessed" valid sequence (based on
properties of the UTF-8 encoding).
Implementations SHOULD use one of the first two solutions where
the general structure of the NNTP stream remains intact and SHOULD
close the connection if it is no longer possible to parse it
sensibly.
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.
> 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!
> Character set issues really aren't defined well unless you're using
> SASL, and there are a ton of them around authentication information and a
> whole standard within SASL (saslprep, RFC 4013) for dealing with them.
I did not know. Thanks!
--
Julien ÉLIE
« -- Mais je leur ai simplement demandé si c'était la bonne route !!!
-- Ils nous ont fait une 'éponse de No'mand ! » (Astérix)
Technical Details
Message-ID:
<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!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news.trigofacile.com!not-for-mailReferences:
<gj8kvn$1aq$1@news.trigofacile.com> <87sko8m5wv.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <gj8o6p$5vh$1@news.trigofacile.com> Subject: Re: UTF-8 in NNTP commands Date: Sun, 28 Dec 2008 21:39:50 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <gj8kvn$1aq$1@news.trigofacile.com> <87sko8m5wv.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!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news.trigofacile.com!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 58 NNTP-Posting-Host: aaubervilliers-151-1-10-208.w83-114.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1230496793 6129 83.114.9.208 (28 Dec 2008 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Sun, 28 Dec 2008 20:39:53 +0000 (UTC) In-Reply-To: <87sko8m5wv.fsf@windlord.stanford.edu> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049