Issue 599679: CRAM-MD5 module - Python tracker (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/37082
classification
Title: | CRAM-MD5 module | |
---|---|---|
Type: | enhancement | Stage: |
Components: | Extension Modules | Versions: |
process
Status: | closed | Resolution: | |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | pierslauder | Nosy List: | doko, ghaering, gvanrossum, pierslauder |
Priority: | normal | Keywords: |
Created on 2002-08-24 17:24 by doko, last changed 2022-04-10 16:05 by admin. This issue is now closed.
Messages (5) | ||
---|---|---|
msg12151 - (view) | Author: Matthias Klose (doko) * ![]() |
Date: 2002-08-24 17:24 |
[Taken from http://bugs.debian.org/154283] A request to provide CRAM-MD5 authentification (in imaplib). | ||
msg12152 - (view) | Author: Gerhard Häring (ghaering) * ![]() |
Date: 2002-08-25 12:31 |
Logged In: YES user_id=163326 Well, the necessary code could probably be found in smtplib.py. Perhaps it only needs to be adapted. | ||
msg12153 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2002-09-03 19:42 |
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. | ||
msg12154 - (view) | Author: Piers Lauder (pierslauder) * ![]() |
Date: 2002-10-14 10:49 |
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.) | ||
msg12155 - (view) | Author: Piers Lauder (pierslauder) * ![]() |
Date: 2002-11-22 06:00 |
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. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-10 16:05:37 | admin | set | github: 37082 |
2002-08-24 17:24:59 | doko | create |