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 ++++- src/mailman/commands/docs/info.txt | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mailman/commands') 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: diff --git a/src/mailman/commands/docs/info.txt b/src/mailman/commands/docs/info.txt index 12fce3223..9658e93e6 100644 --- a/src/mailman/commands/docs/info.txt +++ b/src/mailman/commands/docs/info.txt @@ -60,7 +60,6 @@ The File System Hierarchy layout is the same every by definition. ... File system paths: BIN_DIR = /sbin - CREATOR_PW_FILE = /var/lib/mailman/data/creator.pw DATA_DIR = /var/lib/mailman/data ETC_DIR = /etc EXT_DIR = /etc/mailman.d @@ -73,7 +72,6 @@ The File System Hierarchy layout is the same every by definition. PRIVATE_ARCHIVE_FILE_DIR = /var/lib/mailman/archives/private PUBLIC_ARCHIVE_FILE_DIR = /var/lib/mailman/archives/public QUEUE_DIR = /var/spool/mailman - SITE_PW_FILE = /var/lib/mailman/data/adm.pw TEMPLATE_DIR = .../mailman/templates VAR_DIR = /var/lib/mailman -- cgit v1.2.3-70-g09d2