diff options
| author | mailman | 1998-04-02 20:53:08 +0000 |
|---|---|---|
| committer | mailman | 1998-04-02 20:53:08 +0000 |
| commit | 96b6c23c6a35fa494c068b016324d1710633ca4d (patch) | |
| tree | c6cc1d83c99ca3076dd8bb48347c65c96fd2590c /modules/mm_security.py | |
| parent | 70a118cee0003f6ae66b80aa91f8c2d387c13402 (diff) | |
| download | mailman-96b6c23c6a35fa494c068b016324d1710633ca4d.tar.gz mailman-96b6c23c6a35fa494c068b016324d1710633ca4d.tar.zst mailman-96b6c23c6a35fa494c068b016324d1710633ca4d.zip | |
Diffstat (limited to 'modules/mm_security.py')
| -rw-r--r-- | modules/mm_security.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/mm_security.py b/modules/mm_security.py index c8b460bc5..e08f702c7 100644 --- a/modules/mm_security.py +++ b/modules/mm_security.py @@ -29,7 +29,7 @@ class SecurityManager: def ValidAdminPassword(self, pw): if self.CheckSiteAdminPassword(pw): - return 1 + return 1 return ((type(pw) == types.StringType) and (crypt.crypt(pw, self.password) == self.password)) @@ -60,3 +60,13 @@ class SecurityManager: self.passwords[addr] = newpw self.Save() + def ExtractApproval(self, msg): + """True if message has valid administrator approval. + + Approval line is always stripped from message as a side effect.""" + + p = msg.getheader('approved') + if p == None: + return 0 + msg.delitem('approved') # Mustn't deliver this line!! + return self.ValidAdminPassword(p) |
