~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/app/membership.py

  • Committer: Barry Warsaw
  • Date: 2012-06-28 03:03:04 UTC
  • mto: This revision was merged to the branch mainline in revision 7156.
  • Revision ID: barry@list.org-20120628030304-cjlh7q9tgwasxno2
Replace flufl.password with passlib, albeit with a wrapper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
 
29
29
from email.utils import formataddr
30
 
from flufl.password import lookup, make_secret
31
30
from zope.component import getUtility
32
31
 
33
32
from mailman.app.notifications import send_goodbye_message
34
 
from mailman.config import config
35
33
from mailman.core.i18n import _
36
34
from mailman.email.message import OwnerNotification
37
35
from mailman.interfaces.address import IEmailValidator
40
38
    MemberRole, MembershipIsBannedError, NotAMemberError)
41
39
from mailman.interfaces.usermanager import IUserManager
42
40
from mailman.utilities.i18n import make
 
41
from mailman.utilities.passwords import encrypt
43
42
 
44
43
 
45
44
 
96
95
            user.display_name = (
97
96
                display_name if display_name else address.display_name)
98
97
            user.link(address)
99
 
        # Encrypt the password using the currently selected scheme.  The
100
 
        # scheme is recorded in the hashed password string.
101
 
        scheme = lookup(config.passwords.password_scheme.upper())
102
 
        user.password = make_secret(password, scheme)
 
98
        # Encrypt the password using the currently selected hash scheme.
 
99
        user.password = encrypt(password)
103
100
        user.preferences.preferred_language = language
104
101
        member = mlist.subscribe(address, role)
105
102
        member.preferences.delivery_mode = delivery_mode