summaryrefslogtreecommitdiff
path: root/src/mailman/rest/users.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-07-20 20:47:26 -0400
committerBarry Warsaw2012-07-20 20:47:26 -0400
commit27672b5c94c78fecbda8cf91bb62618b7a0dc7cb (patch)
treef982344c91b096d6bfcb848147a5059b5ab0c0a1 /src/mailman/rest/users.py
parente1aa901fbdcc6d7fbb495a1d9ca1a5079008164a (diff)
parent01415190ab44e69a8f09a6411564a7cb288404e8 (diff)
downloadmailman-27672b5c94c78fecbda8cf91bb62618b7a0dc7cb.tar.gz
mailman-27672b5c94c78fecbda8cf91bb62618b7a0dc7cb.tar.zst
mailman-27672b5c94c78fecbda8cf91bb62618b7a0dc7cb.zip
Diffstat (limited to 'src/mailman/rest/users.py')
-rw-r--r--src/mailman/rest/users.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mailman/rest/users.py b/src/mailman/rest/users.py
index 4e1362120..bce541ae5 100644
--- a/src/mailman/rest/users.py
+++ b/src/mailman/rest/users.py
@@ -26,7 +26,7 @@ __all__ = [
]
-from flufl.password import lookup, make_secret, generate
+from passlib.utils import generate_password as generate
from restish import http, resource
from uuid import UUID
from zope.component import getUtility
@@ -102,8 +102,7 @@ class AllUsers(_UserBase):
if password is None:
# This will have to be reset since it cannot be retrieved.
password = generate(int(config.passwords.password_length))
- scheme = lookup(config.passwords.password_scheme.upper())
- user.password = make_secret(password, scheme)
+ user.password = config.password_context.encrypt(password)
location = path_to('users/{0}'.format(user.user_id.int))
return http.created(location, [], None)