Thread View: news.software.nntp
14 messages
14 total messages
Started by Julien ÉLIE
Wed, 03 Nov 2010 20:37
Encoding of AUTHINFO USER/PASS arguments
Author: Julien ÉLIE
Date: Wed, 03 Nov 2010 20:37
Date: Wed, 03 Nov 2010 20:37
41 lines
2551 bytes
2551 bytes
Hi, 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... I therefore wonder how news clients handle 8-bit passwords. ** How do current news readers send them to news servers? ** And how news servers should decode them? Suppose my password is "été". What is sent for: AUTHINFO PASS été ? Is it '\xE9' + 't' + '\xE9' (3 bytes) or "été" (5 bytes, encoded in UTF-8)? It appears that RFC 4643 does not explain the expected behaviour on that subject. If I have a user name written in Chine characters, GB2312, Big-5 and UTF-8 are quite different! What should be done? Is there an interoperable way to follow? (news clients + news servers) -- Julien ÉLIE « Je ne cherche pas à connaître les réponses, je cherche à comprendre les questions. »
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Russ Allbery
Date: Wed, 03 Nov 2010 21:38
Date: Wed, 03 Nov 2010 21:38
37 lines
2965 bytes
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.
--
Author: JeffRelf.F-M.FM
Date: Wed, 03 Nov 2010 23:12
Date: Wed, 03 Nov 2010 23:12
19 lines
1956 bytes
1956 bytes
<PRE> Personally, I send only UTF·8 to NNTP servers; never would it be “US·ASCII”, Windows·1252 or the like. ThunderBird might be able to send a UTF·8 password, I don't know, but I doubt Windows Live Mail ( formerly Outlook Express ) could do it. As a newsreader, WML·15 ( September 30, 2010 ) is bad and getting worse. I don't know of any servers that permit UTF·8 encoded passwords. Most admins can't input much, if anything, beyond US·ASCII. To display certain languages, e.g. Tamil, you need certain fonts. ThunderBird does it best. The following “Diacritics for complex ligatures” ( ஓம் மணி பத்மே ஹூம ) were done with ArialUni.TTF: <img Src="http://jeffrelf.f-m.fm/Diacritics for complex ligatures.PNG" Alt="Diacritics for complex ligatures, e.g. ஓம் மணி பத்மே ஹூம, Tamil">
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Shmuel Metz
Date: Thu, 04 Nov 2010 12:20
Date: Thu, 04 Nov 2010 12:20
32 lines
3363 bytes
3363 bytes
In <iash7b$1vm$1@news.trigofacile.com>, on 11/03/2010 at 09:37 PM, Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> said: >In the nntplib implementation of Python 3.2, a question is raised >about how AUTHINFO USER/PASS arguments should be encoded. Does it support RFC 4643 or only the AUTHINFO from RFC 2980? >I therefore wonder how news clients handle 8-bit passwords. A more basic question is how many are still based on RFC 1036 rather than RFC 3977. >** And how news servers should decode them? If the news server supports RFC's 1036 and 4643 then it should interpret the data as ASCII. If the news server only supports RFC's 1036 and 2980 (AUTHINFO) then it should treat octets 128-255 as invalid. >Suppose my password is "été". Then you need a news client that supports RFC 4643. -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply to domain Patriot dot net user shmuel+news to contact me. Do not reply to spamtrap@library.lspace.org
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Shmuel Metz
Date: Thu, 04 Nov 2010 12:23
Date: Thu, 04 Nov 2010 12:23
17 lines
2649 bytes
2649 bytes
In <8762we9jfs.fsf@windlord.stanford.edu>, on 11/03/2010 at 02:38 PM, Russ Allbery <rra@stanford.edu> said: >It's completely unspecified what encoding to use for AUTHINFO >USER/PASS, Doesn't RFC 2980 imply RFC 1036, hence ASCII only, and RFC 4643 imply RFC 3977, hence UTF-8? -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply to domain Patriot dot net user shmuel+news to contact me. Do not reply to spamtrap@library.lspace.org
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Joshua Cranmer
Date: Thu, 04 Nov 2010 12:58
Date: Thu, 04 Nov 2010 12:58
31 lines
2605 bytes
2605 bytes
On 11/03/2010 04:37 PM, Julien ÉLIE wrote: > I therefore wonder how news clients handle 8-bit passwords. > > ** How do current news readers send them to news servers? Looking at the code for Thunderbird, the password is lossily converted to ASCII, so non-ASCII characters shouldn't work. A brief search on bugzilla indicates a single bug for this with a single duplicate and rather little interest by the outside community, so it seems that the occurrence of non-ASCII passwords is relatively rare. > Suppose my password is "été". What is sent for: > > AUTHINFO PASS été > ? > > Is it '\xE9' + 't' + '\xE9' (3 bytes) or "été" (5 bytes, > encoded in UTF-8)? Given my general background knowledge of NNTP charset handling in Thunderbird, the most appropriate thing to do is to keep handling it in the same charset as the server. So if I said that this is a server that uses GB2312, it sends the password in GB2312. If I said it was UTF-8, it uses UTF-8. Which means if the rest of your communication uses UTF-8, UTF-8 passwords are the safest way to go. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Whiskers
Date: Fri, 05 Nov 2010 01:40
Date: Fri, 05 Nov 2010 01:40
13 lines
1568 bytes
1568 bytes
I would point out that Thunderbird may not be the best exemplar of good practice. I know that as an email program it can cause authentication failure with accounts that have non-ascii authinfo characters and which do work with other programs. So clearly some users expect non-ascii logins. Perhaps slrn or Pan would be better examples of what works on Usenet? -- -- -- ^^^^^^^^^^ -- Whiskers -- ~~~~~~~~~~
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Julien ÉLIE
Date: Sat, 13 Nov 2010 00:25
Date: Sat, 13 Nov 2010 00:25
56 lines
3594 bytes
3594 bytes
Hi Russ, >> 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. All right. Thanks a lot for the explanation. I did not know SASL specifies an encoding. That's good news for inter-operability. RFC 4614 about the basic SASL PLAIN mechanism: The mechanism consists of a single message, a string of [UTF-8] encoded [Unicode] characters, from the client to the server. [...] The authorization identity (authzid), authentication identity (authcid), password (passwd), and NUL character deliminators SHALL be transferred as [UTF-8] encoded strings of [Unicode] characters. As the NUL (U+0000) character is used as a deliminator, the NUL (U+0000) character MUST NOT appear in authzid, authcid, or passwd productions. Incidentally, is there a nuance between MUST and SHALL? RFC 2119 does not speak about a possible difference in meaning: MUST This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification. Yet, I thought that a question like "Shall I do that?" is different than "Must I do that?"... > 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. OK. -- Julien ÉLIE « Give laugh to all but smile to one, Give cheeks to all but lips to one, Give love to all but Heart to one, Let everybody love you But you love one. »
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Julien ÉLIE
Date: Sat, 13 Nov 2010 00:25
Date: Sat, 13 Nov 2010 00:25
27 lines
2537 bytes
2537 bytes
Hi JeffRelf.F-M.FM, > ThunderBird might be able to send a UTF·8 password, I don't know, > but I doubt Windows Live Mail ( formerly Outlook Express ) could do it. Just tested with Windows Mail 6: it sends usernames and passwords with the local character set encoding (as Russ guessed). It does not re-encode what I am typing; so I can write my credentials in a pseudo UTF-8 if I want (that is to say write UTF-8 in latin1 [or perhaps Windows-1252 -- I have not tested]). > I don't know of any servers that permit UTF·8 encoded passwords. Why wouldn't them?!? > To display certain languages, e.g. Tamil, you need certain fonts. I do not need fonts. I just need hexadecimal values to generate the proper hash that will match your UTF-8 password. -- Julien ÉLIE « Rome sweet Rome. » (Astérix)
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Julien ÉLIE
Date: Sat, 13 Nov 2010 00:25
Date: Sat, 13 Nov 2010 00:25
18 lines
2367 bytes
2367 bytes
Hi Joshua, > Given my general background knowledge of NNTP charset handling in Thunderbird, the > most appropriate thing to do is to keep handling it in the same charset as the > server. So if I said that this is a server that uses GB2312, it sends the password > in GB2312. If I said it was UTF-8, it uses UTF-8. That would indeed be better than dropping non-ASCII characters. Anyway, as you said, it is not common to see passwords with non-ASCII characters. Maybe it is more usual for usernames, because they naturally contain non-ASCII characters. Yet, they are as often as not asciified :-) -- Julien ÉLIE « Some joys are better expressed in silence as a smile holds more meaning than words. »
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Russ Allbery
Date: Sat, 13 Nov 2010 00:43
Date: Sat, 13 Nov 2010 00:43
30 lines
2634 bytes
2634 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> RFC 4614 about the basic SASL PLAIN mechanism:
> The mechanism consists of a single message, a string of [UTF-8]
> encoded [Unicode] characters, from the client to the server.
> [...]
> The authorization identity (authzid), authentication identity
> (authcid), password (passwd), and NUL character deliminators SHALL be
> transferred as [UTF-8] encoded strings of [Unicode] characters. As
> the NUL (U+0000) character is used as a deliminator, the NUL (U+0000)
> character MUST NOT appear in authzid, authcid, or passwd productions.
> Incidentally, is there a nuance between MUST and SHALL?
> RFC 2119 does not speak about a possible difference in meaning:
> MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
> definition is an absolute requirement of the specification.
> Yet, I thought that a question like "Shall I do that?" is different than
> "Must I do that?"...
There's some difference in English, but in RFC 2119 language they're
equivalent.
--
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.
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Adam H. Kerman
Date: Sat, 13 Nov 2010 01:46
Date: Sat, 13 Nov 2010 01:46
20 lines
2253 bytes
2253 bytes
Julien <iulius@nom-de-mon-site.com.invalid> wrote: >Incidentally, is there a nuance between MUST and SHALL? >RFC 2119 does not speak about a possible difference in meaning: > MUST This word, or the terms "REQUIRED" or "SHALL", mean that the > definition is an absolute requirement of the specification. >Yet, I thought that a question like "Shall I do that?" is different than >"Must I do that?"... In the first question, the speaker is considering his intent to do something. In the second question, the speaker is considering if he is required to do something. In standards language, MUST, MUST NOT, SHALL, SHALL NOT are phrased as commands so they are equivalent for all practical purposes. Even in common speech, there would be no practical difference between You shall do that, and You must do that.
Re: Encoding of AUTHINFO USER/PASS arguments
Author: Shmuel Metz
Date: Mon, 15 Nov 2010 11:54
Date: Mon, 15 Nov 2010 11:54
22 lines
3131 bytes
3131 bytes
In <ibkqlj$qi3$2@news.albasani.net>, on 11/13/2010 at 01:46 AM, "Adam H. Kerman" <ahk@chinet.com> said: >Even in common speech, there would be no practical difference between >You shall do that, and You must do that. "You shall fail your prelims" is quite different from "you must fail your prelims". It is true that in English, as in other languages, the future tense is sometimes used as an alternative imperative tense, but that does not eliminate the use of the future tense as a predictive tense. As a practical matter, there are English sentences that wouldn't even make sense if you substituted "must" for "shall", e.g., "You shall grow old, as all before you have done." -- Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel> Unsolicited bulk E-mail subject to legal action. I reserve the right to publicly post or ridicule any abusive E-mail. Reply to domain Patriot dot net user shmuel+news to contact me. Do not reply to spamtrap@library.lspace.org
Re: Encoding of AUTHINFO USER/PASS arguments
Author: nick
Date: Wed, 17 Nov 2010 20:40
Date: Wed, 17 Nov 2010 20:40
55 lines
3086 bytes
3086 bytes
That would be a client issue not a server problem. If you used été as a password the client then converts that to a encoded string of bytes, thats' all the server sees is a string of bytes, it does not display your password in any human readable form so it does not need to know the encoding used. Just a string of numbers. It is upto the client to convert any language to a string of bytes, not for the server to understand every language on earth. There are no requirements that a password should be human readable. "Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message news:iash7b$1vm$1@news.trigofacile.com... > Hi, > > 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... > > > I therefore wonder how news clients handle 8-bit passwords. > > ** How do current news readers send them to news servers? > ** And how news servers should decode them? > > > Suppose my password is "été". What is sent for: > > AUTHINFO PASS été > ? > > Is it '\xE9' + 't' + '\xE9' (3 bytes) or "été" (5 bytes, > encoded in UTF-8)? > > > It appears that RFC 4643 does not explain the expected behaviour > on that subject. > If I have a user name written in Chine characters, GB2312, Big-5 > and UTF-8 are quite different! > > What should be done? Is there an interoperable way to follow? > (news clients + news servers) > > -- > Julien ÉLIE > > « Je ne cherche pas à connaître les réponses, je cherche à comprendre > les questions. »
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads