diff options
| author | Barry Warsaw | 2012-07-20 20:47:26 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-07-20 20:47:26 -0400 |
| commit | 27672b5c94c78fecbda8cf91bb62618b7a0dc7cb (patch) | |
| tree | f982344c91b096d6bfcb848147a5059b5ab0c0a1 /src/mailman/rules/approved.py | |
| parent | e1aa901fbdcc6d7fbb495a1d9ca1a5079008164a (diff) | |
| parent | 01415190ab44e69a8f09a6411564a7cb288404e8 (diff) | |
| download | mailman-27672b5c94c78fecbda8cf91bb62618b7a0dc7cb.tar.gz mailman-27672b5c94c78fecbda8cf91bb62618b7a0dc7cb.tar.zst mailman-27672b5c94c78fecbda8cf91bb62618b7a0dc7cb.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 |
