aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi
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
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
-rw-r--r--Mailman/Cgi/create.py6
2 files changed, 6 insertions, 6 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:
diff --git a/Mailman/Cgi/create.py b/Mailman/Cgi/create.py
index 55ec2887..7e21b981 100644
--- a/Mailman/Cgi/create.py
+++ b/Mailman/Cgi/create.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2008 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -21,7 +21,6 @@ import sys
import os
import signal
import cgi
-import sha
from types import ListType
from Mailman import mm_cfg
@@ -31,6 +30,7 @@ from Mailman import Errors
from Mailman import i18n
from Mailman.htmlformat import *
from Mailman.Logging.Syslog import syslog
+from Mailman.Utils import sha_new
# Set up i18n
_ = i18n._
@@ -180,7 +180,7 @@ def process_request(doc, cgidata):
# Install the emergency shutdown signal handler
signal.signal(signal.SIGTERM, sigterm_handler)
- pw = sha.new(password).hexdigest()
+ pw = sha_new(password).hexdigest()
# Guarantee that all newly created files have the proper permission.
# proper group ownership should be assured by the autoconf script
# enforcing that all directories have the group sticky bit set