diff options
| author | Barry Warsaw | 2011-04-08 22:02:49 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-04-08 22:02:49 -0400 |
| commit | 25b407e24fe21dc46a4f9efa77734d55e0ed4bdd (patch) | |
| tree | d129f8727bac75263c08d84b5138bef8f693ffef /src/mailman/app | |
| parent | c73acb993acfc08f542b886eb426d6156a6a0a13 (diff) | |
| download | mailman-25b407e24fe21dc46a4f9efa77734d55e0ed4bdd.tar.gz mailman-25b407e24fe21dc46a4f9efa77734d55e0ed4bdd.tar.zst mailman-25b407e24fe21dc46a4f9efa77734d55e0ed4bdd.zip | |
encrypt_password(): New convenience function for ensuring that a password is
both encrypted according to a scheme, and a bytes object.
add_member(): Use encrypt_password().
cli_members: Give the user a default, user-friendly password. Of course, this
will be encrypted so it can't be retrieved, but it can be reset.
Passwords are stored as bytes objects, not unicode now.
ConfigLayer: Set the default test password scheme to cleartext.
General test repair.
Diffstat (limited to 'src/mailman/app')
| -rw-r--r-- | src/mailman/app/membership.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mailman/app/membership.py b/src/mailman/app/membership.py index 56df18269..aaf7f05df 100644 --- a/src/mailman/app/membership.py +++ b/src/mailman/app/membership.py @@ -30,7 +30,6 @@ from email.utils import formataddr from zope.component import getUtility from mailman.app.notifications import send_goodbye_message -from mailman.config import config from mailman.core.i18n import _ from mailman.email.message import OwnerNotification from mailman.interfaces.address import IEmailValidator @@ -40,7 +39,7 @@ from mailman.interfaces.member import ( NotAMemberError) from mailman.interfaces.usermanager import IUserManager from mailman.utilities.i18n import make -from mailman.utilities.passwords import lookup_scheme, make_secret +from mailman.utilities.passwords import encrypt_password @@ -98,9 +97,7 @@ def add_member(mlist, email, realname, password, delivery_mode, language): user.link(address) # Encrypt the password using the currently selected scheme. The # scheme is recorded in the hashed password string. - user.password = make_secret( - password, - lookup_scheme(config.passwords.password_scheme)) + user.password = encrypt_password(password) user.preferences.preferred_language = language member = address.subscribe(mlist, MemberRole.member) member.preferences.delivery_mode = delivery_mode |
