diff options
| -rw-r--r-- | Mailman/Cgi/create.py | 3 | ||||
| -rw-r--r-- | Mailman/passwords.py | 3 |
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:]) |
