πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79958

Re: UTF-8 in NNTP commands

#79958
From: Russ Allbery
Date: Mon, 29 Dec 2008 19:03
39 lines
2956 bytes
Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> writes:

> Hi Russ,
>
>> So we really *should* do something to remove invalid UTF-8, but since
>> UTF-8 support is new, this may break things.
>
> Should it be done on AUTHINFO USER/PASS too?  (Has B-CHAR to be in UTF-8?)

Given the ABNF, I think it shouldn't.  After you mentioned that, I vaguely
remember having that come up at the time.

> Otherwise, UTF-8 can only be put in wildmats for newsgroup names
> (LIST ACTIVE, LIST ACTIVE.TIMES, LIST NEWSGROUPS, NEWNEWS, XGTITLE),
> in newsgroup names (GROUP, LISTGROUP) or in XPAT.

XPAT is a nasty problem that may have to be another special case.
Otherwise, newsgroup names are already supposed to be in either ASCII or
UTF-8, and header field names are, of course, required to be ASCII.

> For all these cases, it is a byte string comparison so maybe UTF-8 should
> not be checked (the right command in UTF-8 will probably not be working).
> XPAT normally uses US-ASCII (search in headers).

Well, applications that take UTF-8 as input are supposed to check it for
well-formedness because there are some weird things that you can
potentially do if you can use arbitrary malformed UTF-8 (mostly by
exploiting differences in interpretation in different systems).

I'm starting to wonder if it would be useful to have some sort of strictly
conforming configuration flag in INN that, if set, checks all UTF-8,
requires RFC 1036-compliant message IDs for all articles, etc.  Might be
more trouble than it's worth, though.

-- 
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: <8763l2ls73.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!feeder.news-service.com!postnews.google.com!news1.google.com!newsfeed.stanford.edu!news.stanford.edu!not-for-mail
References: <gj8kvn$1aq$1@news.trigofacile.com> <87sko8m5wv.fsf@windlord.stanford.edu> <gj8o6p$5vh$1@news.trigofacile.com> <87ocywm2za.fsf@windlord.stanford.edu> <gj9u12$sa4$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <8763l2ls73.fsf@windlord.stanford.edu>
Subject: Re: UTF-8 in NNTP commands
Date: Mon, 29 Dec 2008 11:03:28 -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> <87ocywm2za.fsf@windlord.stanford.edu> <gj9u12$sa4$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!feeder.news-service.com!postnews.google.com!news1.google.com!newsfeed.stanford.edu!news.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 39
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 1230577408 5815 171.67.225.134 (29 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:SXgrX3T6oHIcqgqRLz4/83hxvZw=