From 25b407e24fe21dc46a4f9efa77734d55e0ed4bdd Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 8 Apr 2011 22:02:49 -0400 Subject: 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. --- src/mailman/commands/cli_members.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mailman/commands/cli_members.py') diff --git a/src/mailman/commands/cli_members.py b/src/mailman/commands/cli_members.py index cd7fcfbf1..96469c0f1 100644 --- a/src/mailman/commands/cli_members.py +++ b/src/mailman/commands/cli_members.py @@ -40,6 +40,7 @@ from mailman.interfaces.command import ICLISubCommand from mailman.interfaces.listmanager import IListManager from mailman.interfaces.member import ( AlreadySubscribedError, DeliveryMode, DeliveryStatus) +from mailman.utilities.passwords import make_user_friendly_password @@ -196,8 +197,10 @@ class Members: real_name, email = parseaddr(line) real_name = real_name.decode(fp.encoding) email = email.decode(fp.encoding) + # Give the user a default, user-friendly password. + password = make_user_friendly_password() try: - add_member(mlist, email, real_name, None, + add_member(mlist, email, real_name, password, DeliveryMode.regular, mlist.preferred_language.code) except AlreadySubscribedError: -- cgit v1.2.3-70-g09d2