summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkikuchi2007-03-27 06:35:12 +0000
committertkikuchi2007-03-27 06:35:12 +0000
commit92188309a4648d23abb97f8dd2c6c924d9ea24b1 (patch)
tree5b354cbaf18d21689eca47573359dca660e622c5
parentc1baffd25ba7290efcf7b1617ef08886712368f2 (diff)
downloadmailman-92188309a4648d23abb97f8dd2c6c924d9ea24b1.tar.gz
mailman-92188309a4648d23abb97f8dd2c6c924d9ea24b1.tar.zst
mailman-92188309a4648d23abb97f8dd2c6c924d9ea24b1.zip
-rw-r--r--Mailman/Cgi/create.py3
-rw-r--r--Mailman/passwords.py3
2 files changed, 3 insertions, 3 deletions
diff --git a/Mailman/Cgi/create.py b/Mailman/Cgi/create.py
index ed29e7f59..0ca51bd65 100644
--- a/Mailman/Cgi/create.py
+++ b/Mailman/Cgi/create.py
@@ -161,7 +161,8 @@ def process_request(doc, cgidata):
# We've got all the data we need, so go ahead and try to create the list
mlist = MailList.MailList()
try:
- pw = passwords.make_secret(password, config.PASSWORD_SCHEME)
+ scheme = passwords.lookup_scheme(config.PASSWORD_SCHEME.lower())
+ pw = passwords.make_secret(password, scheme)
try:
mlist.Create(fqdn_listname, owner, pw, langs)
except Errors.EmailAddressError, s:
diff --git a/Mailman/passwords.py b/Mailman/passwords.py
index d84ab9f48..615bbcc17 100644
--- a/Mailman/passwords.py
+++ b/Mailman/passwords.py
@@ -241,8 +241,7 @@ def check_response(challenge, response):
scheme_enum = _SCHEMES_BY_TAG.get(scheme, _DEFAULT_SCHEME)
scheme_class = _SCHEMES_BY_ENUM[scheme_enum]
if isinstance(rest_group, unicode):
- # decode() fails. (challenge is from database)
- rest_group = str(rest_group)
+ rest_group = rest_group.encode('utf-8')
return scheme_class.check_response(rest_group, response, *scheme_parts[1:])