summaryrefslogtreecommitdiff
path: root/src/mailman/rest
diff options
context:
space:
mode:
authorBarry Warsaw2011-04-08 22:05:33 -0400
committerBarry Warsaw2011-04-08 22:05:33 -0400
commit5de5904af6dd97339a70630002d64c901b008c98 (patch)
treee9c01a2bd38587226745043b47106de1ac5efb84 /src/mailman/rest
parent0a58c7a9f2fe97665fba102eea9287b28575de5c (diff)
parent25b407e24fe21dc46a4f9efa77734d55e0ed4bdd (diff)
downloadmailman-5de5904af6dd97339a70630002d64c901b008c98.tar.gz
mailman-5de5904af6dd97339a70630002d64c901b008c98.tar.zst
mailman-5de5904af6dd97339a70630002d64c901b008c98.zip
Diffstat (limited to 'src/mailman/rest')
-rw-r--r--src/mailman/rest/adapters.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mailman/rest/adapters.py b/src/mailman/rest/adapters.py
index 30ce99f44..5cbb89bc1 100644
--- a/src/mailman/rest/adapters.py
+++ b/src/mailman/rest/adapters.py
@@ -36,6 +36,7 @@ from mailman.interfaces.address import InvalidEmailAddressError
from mailman.interfaces.listmanager import IListManager, NoSuchListError
from mailman.interfaces.member import DeliveryMode
from mailman.interfaces.membership import ISubscriptionService
+from mailman.utilities.passwords import make_user_friendly_password
@@ -84,15 +85,12 @@ class SubscriptionService:
raise InvalidEmailAddressError(address)
# Because we want to keep the REST API simple, there is no password or
# language given to us. We'll use the system's default language for
- # the user's default language. We'll set the password to None. XXX
- # Is that a good idea? Maybe we should set it to something else,
- # except that once we encode the password (as we must do to avoid
- # cleartext passwords in the database) we'll never be able to retrieve
- # it.
- #
+ # the user's default language. We'll set the password to a system
+ # default. This will have to get reset since it can't be retrieved.
# Note that none of these are used unless the address is completely
# new to us.
- return add_member(mlist, address, real_name, None, mode,
+ password = make_user_friendly_password()
+ return add_member(mlist, address, real_name, password, mode,
system_preferences.preferred_language)
def leave(self, fqdn_listname, address):