diff options
| author | Barry Warsaw | 2012-07-02 16:08:58 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2012-07-02 16:08:58 -0400 |
| commit | 3e2231b8835820d240112e7e07cff2a369f178f2 (patch) | |
| tree | 513c973ae93f36efe969793e1a8abb28efbfc7bd /src/mailman/rules/approved.py | |
| parent | 762af9a7d81fe88327c37f29c851a4d6f7bdaa45 (diff) | |
| download | mailman-3e2231b8835820d240112e7e07cff2a369f178f2.tar.gz mailman-3e2231b8835820d240112e7e07cff2a369f178f2.tar.zst mailman-3e2231b8835820d240112e7e07cff2a369f178f2.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 dadc25322..3ff7d21ec 100644 --- a/src/mailman/rules/approved.py +++ b/src/mailman/rules/approved.py @@ -30,9 +30,9 @@ import re from email.iterators import typed_subpart_iterator from zope.interface import implementer +from mailman.config import config from mailman.core.i18n import _ from mailman.interfaces.rules import IRule -from mailman.utilities.passwords import verify EMPTYSTRING = '' @@ -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 |
