aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi/admin.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@list.org>2008-11-12 23:02:29 -0500
committerBarry Warsaw <barry@list.org>2008-11-12 23:02:29 -0500
commita86be44b08fe0935fe77d90948b9baad85af3624 (patch)
treecc9b8b20530f1d54975005d19f9a17fddade945d /Mailman/Cgi/admin.py
parent392554b8de4641c8ac9c5ca1e062919a64ecd020 (diff)
downloadmailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.gz
mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.xz
mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.zip
Apply Heiko Rommel's patch for hashlib deprecation warnings for bug 293178.
I've modified the patch to improve some of the stylistic issues.
Diffstat (limited to '')
-rw-r--r--Mailman/Cgi/admin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py
index a6251058..ba44fc44 100644
--- a/Mailman/Cgi/admin.py
+++ b/Mailman/Cgi/admin.py
@@ -24,7 +24,6 @@ import sys
import os
import re
import cgi
-import sha
import urllib
import signal
from types import *
@@ -41,6 +40,7 @@ from Mailman.UserDesc import UserDesc
from Mailman.htmlformat import *
from Mailman.Cgi import Auth
from Mailman.Logging.Syslog import syslog
+from Mailman.Utils import sha_new
# Set up i18n
_ = i18n._
@@ -1269,7 +1269,7 @@ def change_options(mlist, category, subcat, cgidata, doc):
confirm = cgidata.getvalue('confirmmodpw', '').strip()
if new or confirm:
if new == confirm:
- mlist.mod_password = sha.new(new).hexdigest()
+ mlist.mod_password = sha_new(new).hexdigest()
# No re-authentication necessary because the moderator's
# password doesn't get you into these pages.
else:
@@ -1279,7 +1279,7 @@ def change_options(mlist, category, subcat, cgidata, doc):
confirm = cgidata.getvalue('confirmpw', '').strip()
if new or confirm:
if new == confirm:
- mlist.password = sha.new(new).hexdigest()
+ mlist.password = sha_new(new).hexdigest()
# Set new cookie
print mlist.MakeCookie(mm_cfg.AuthListAdmin)
else: