diff options
| author | Barry Warsaw | 2012-06-27 23:03:04 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-06-27 23:03:04 -0400 |
| commit | 955d267e5f4479cea6adb93871af1eb80aa492b6 (patch) | |
| tree | c3e412bcf0251ed6a53694d781d757ddd21b5ac7 /src/mailman/rest/users.py | |
| parent | 3c8a07fc76176a8ea89ee6b73aef571d0b2c81ed (diff) | |
| download | mailman-955d267e5f4479cea6adb93871af1eb80aa492b6.tar.gz mailman-955d267e5f4479cea6adb93871af1eb80aa492b6.tar.zst mailman-955d267e5f4479cea6adb93871af1eb80aa492b6.zip | |
Diffstat (limited to 'src/mailman/rest/users.py')
| -rw-r--r-- | src/mailman/rest/users.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mailman/rest/users.py b/src/mailman/rest/users.py index 4e1362120..6bab7c789 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 @@ -38,6 +38,7 @@ from mailman.rest.addresses import UserAddresses from mailman.rest.helpers import CollectionMixin, etag, no_content, path_to from mailman.rest.preferences import Preferences from mailman.rest.validator import Validator +from mailman.utilities.passwords import encrypt @@ -102,8 +103,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 = encrypt(password) location = path_to('users/{0}'.format(user.user_id.int)) return http.created(location, [], None) |
