diff options
| author | klm | 1998-09-05 22:12:23 +0000 |
|---|---|---|
| committer | klm | 1998-09-05 22:12:23 +0000 |
| commit | a214188729a6e391124da7cec122022dc820e773 (patch) | |
| tree | 2f85fb94ad2c6d7a1fb0f695e144d9fa107d99c4 /Mailman/MailCommandHandler.py | |
| parent | 1b3833849105ab31cb4f3eda069127de8743dc6c (diff) | |
| download | mailman-a214188729a6e391124da7cec122022dc820e773.tar.gz mailman-a214188729a6e391124da7cec122022dc820e773.tar.zst mailman-a214188729a6e391124da7cec122022dc820e773.zip | |
ProcessSubscribeCmd(): Deny attempts to subscribe a list to itself
- and log a message in the new log file, "mischief" indicating the
error and, if available, the identity of the host where it originated.
Diffstat (limited to 'Mailman/MailCommandHandler.py')
| -rw-r--r-- | Mailman/MailCommandHandler.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py index fc8ab6f08..839387fe6 100644 --- a/Mailman/MailCommandHandler.py +++ b/Mailman/MailCommandHandler.py @@ -448,12 +448,20 @@ class MailCommandHandler: pending_addr = mail.GetSender() else: pending_addr = address + remote = mail.GetSender() + if pending_addr == self.GetListEmail(): + badremote = "\n\tfrom " + if remote: badremote = badremote + remote + else: badremote = badremote + "unidentified sender" + self.LogMsg("mischief", ("Attempt to self subscribe %s:%s" + % (pending_addr, badremote))) + self.AddApprovalMsg("Attempt to subscribe a list to itself!") + return if self.FindUser(pending_addr): self.AddError("%s is already a list member." % pending_addr) return cookie = Pending.gencookie() Pending.add2pending(pending_addr, password, digest, cookie) - remote = mail.GetSender() if remote == pending_addr: remote = "" else: |
