diff options
| author | Barry Warsaw | 2012-07-03 10:36:39 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-07-03 10:36:39 -0400 |
| commit | 01415190ab44e69a8f09a6411564a7cb288404e8 (patch) | |
| tree | 869503cb83afa74a17446363a6dbda5ba62d2b8d /src/mailman/rules/approved.py | |
| parent | 3c8a07fc76176a8ea89ee6b73aef571d0b2c81ed (diff) | |
| parent | 011677d7457f1d4c9cea3b030c8a50e941657812 (diff) | |
| download | mailman-01415190ab44e69a8f09a6411564a7cb288404e8.tar.gz mailman-01415190ab44e69a8f09a6411564a7cb288404e8.tar.zst mailman-01415190ab44e69a8f09a6411564a7cb288404e8.zip | |
Diffstat (limited to 'src/mailman/rules/approved.py')
| -rw-r--r-- | src/mailman/rules/approved.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mailman/rules/approved.py b/src/mailman/rules/approved.py index 1f4fc1369..3ff7d21ec 100644 --- a/src/mailman/rules/approved.py +++ b/src/mailman/rules/approved.py @@ -28,9 +28,9 @@ __all__ = [ import re from email.iterators import typed_subpart_iterator -from flufl.password import verify from zope.interface import implementer +from mailman.config import config from mailman.core.i18n import _ from mailman.interfaces.rules import IRule @@ -119,8 +119,14 @@ class Approved: else: for header in HEADERS: del msg[header] - return (password is not missing and - verify(mlist.moderator_password, password)) + if password is missing: + return False + is_valid, new_hash = config.password_context.verify( + mlist.moderator_password, password) + if is_valid and new_hash: + # Hash algorithm migration. + mlist.moderator_password = new_hash + return is_valid |
