[Python-bugs-list] [ python-Bugs-599679 ] CRAM-MD5 module

noreply@sourceforge.net noreply@sourceforge.net
Thu, 21 Nov 2002 22:00:50 -0800


Bugs item #599679, was opened at 2002-08-25 03:24
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=599679&group_id=5470

Category: Extension Modules
Group: Feature Request
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Matthias Klose (doko)
Assigned to: Piers Lauder (pierslauder)
Summary: CRAM-MD5 module

Initial Comment:
[Taken from http://bugs.debian.org/154283]

A request to provide CRAM-MD5 authentification (in
imaplib).


----------------------------------------------------------------------

>Comment By: Piers Lauder (pierslauder)
Date: 2002-11-22 17:00

Message:
Logged In: YES 
user_id=196212

I've added a "login_cram_md5" method to imaplib.py that
performs CRAM-MD5 authentication.

This way users can be certain which authentication method is
in use - they are either getting passwords transmitted in
cleartext if they use "login", or they can try"
login_cram_md5" to attempt the shared-secret style of
authentication.

----------------------------------------------------------------------

Comment By: Piers Lauder (pierslauder)
Date: 2002-10-14 20:49

Message:
Logged In: YES 
user_id=196212

The support is already present for doing CRAM-MD5
authentication.
For instance the following code should work:

  def authenticator(challenge):
    import hmac
    return User + " " + hamc.HMAC(Password,
challenge).hexdigest()

  M = imaplib.IMAP4(host)
  M.authenticate('CRAM-MD5', authenticator)

Let me know if it works for you, and i'll consider adding
the code to
IMAP4.login to try CRAM-MD5 automatically provided it appears in
the server capabilities response. (I'm reluctant to do so
because similar
code in smtplib failed to work for some SMTP server versions
and broke
login completely.)

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-09-04 05:42

Message:
Logged In: YES 
user_id=6380

Assigning to Piers Lauder, who supports the imaplib module.

But it would be nice if you submitted a patch.

----------------------------------------------------------------------

Comment By: Gerhard Häring (ghaering)
Date: 2002-08-25 22:31

Message:
Logged In: YES 
user_id=163326

Well, the necessary code could probably be found in
smtplib.py. Perhaps it only needs to be adapted.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=599679&group_id=5470