diff options
author | Christian Heimes <christian@cheimes.de> | 2013-11-20 16:23:06 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-11-20 16:23:06 (GMT) |
commit | 634919a9fa1fffe3d36b13b4248f99508b5999ed (patch) | |
tree | b60c9ca7e04ad97e11385712b3405fc9b42d7803 /Lib/imaplib.py | |
parent | 7f48396cb5d19a40f571b0aec4916612f117a13d (diff) | |
download | cpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.zip cpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.tar.gz cpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.tar.bz2 |
Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
module supports digestmod names, e.g. hmac.HMAC('sha1').
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 0994f2b..b29487a 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -554,7 +554,7 @@ class IMAP4: import hmac pwd = (self.password.encode('ASCII') if isinstance(self.password, str) else self.password) - return self.user + " " + hmac.HMAC(pwd, challenge).hexdigest() + return self.user + " " + hmac.HMAC(pwd, challenge, 'md5').hexdigest() def logout(self): |