Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org, <mule-ja@m17n.org>
Subject: Re: pop3.el broken
Date: Fri, 15 Mar 2002 19:03:04 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.44.0203151850290.16547-100000@yxa.extundo.com> (raw)
In-Reply-To: <yosuadtanf4g.fsf@jpl.org>

On Fri, 15 Mar 2002, Katsumi Yamaoka wrote:

> The problem that the return value of `md5' for a multibyte string
> and a unibyte string differ under Emacs 21 is caused by Mule-UCS.
> However, it is not a bug of Mule-UCS.  What we should do is to
> improve pop3.el after all.  I will attach a new patch.

This patch looks OK.  Out of curiosity, is it sufficient to, instead, pass
'binary as CODING-SYSTEM to `md5'?  It seems as if the problem really is 
`md5' guessing incorrectly about a good coding system to use, using hints 
provided by Mule-UCS.  Converting the string into unibyte before calling 
md5, as your patch does, is one solution, but maybe the string can be 
passed directly to `md5' if you provide it with a better coding system to 
encode the string as.

> Even if Mule-UCS is not used, a string as the first argument of
> `md5' is always encoded by some coding-system, but almost all
> coding-systems will not alter an ascii text.  Exceptionally, it
> is a very rare case but it is possible that if a person has set
> the value of `coding-category-iso-7' with the coding-system
> `iso-2022-jp-1978-irv' (which is known as "old JIS") and push
> `coding-category-iso-7' into `coding-category-list', she or he
> would not be able to use the apop authentication with pop3.el.
> In my opinion that it should never be her or his fault.

The problem really is that POP3/APOP does not define in what encoding the
password should be encoded into before inputting it to the hash function.  
It is left as a customization things, which means that only ASCII will
interoperate unless you configure your client to what the server uses.

The best would be if the protocol said "the password should be encoded
into UTF-8" before hashed.  Hm.  Perhaps pop3.el should always encode the 
password as UTF-8 instead of using string-as-unibyte.  At least it seems 
more configurable, if you make the 'utf-8 choice customizable.  But I 
haven't tried it, so maybe passing 'utf-8 to `md5' does not work.  (I 
remember that I really did not understand what I was doing when I wrote 
`md5'.)




  reply	other threads:[~2002-03-15 18:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13 10:58 Pavel Janík
2002-03-13 15:50 ` Stainless Steel Rat
2002-03-13 16:20 ` Bill White
2002-03-13 16:31   ` Bill White
2002-03-13 17:46 ` Bill White
2002-03-13 17:53   ` Paul Jarc
2002-03-13 20:21     ` Karl Kleinpaste
2002-03-13 19:58 ` Simon Josefsson
2002-03-13 22:39   ` Katsumi Yamaoka
2002-03-14  4:52     ` Stainless Steel Rat
2002-03-14  7:01       ` Katsumi Yamaoka
2002-03-14  9:35       ` Simon Josefsson
2002-03-14 22:11         ` Stainless Steel Rat
2002-03-15 13:18           ` Katsumi Yamaoka
2002-03-15 18:03             ` Simon Josefsson [this message]
2002-03-16  4:03               ` Stainless Steel Rat
2002-03-16  9:59                 ` Simon Josefsson
2002-03-16 10:24                   ` Simon Josefsson
2002-03-16 15:19                     ` Stainless Steel Rat
2002-03-18 13:03                       ` Katsumi Yamaoka
2002-03-18 15:53                         ` Stainless Steel Rat
2002-03-18 17:12                           ` Simon Josefsson
2002-03-18 18:04                             ` Stainless Steel Rat
2002-03-18 17:30                         ` Simon Josefsson
2002-03-18 23:43                           ` Katsumi Yamaoka
2002-03-19  1:13                             ` Stainless Steel Rat
2002-03-19  9:54                             ` Simon Josefsson
2002-03-16  3:57             ` Stainless Steel Rat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0203151850290.16547-100000@yxa.extundo.com \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    --cc=mule-ja@m17n.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).