summaryrefslogtreecommitdiff
path: root/Mailman/MailCommandHandler.py
diff options
context:
space:
mode:
authorklm1998-09-05 22:12:23 +0000
committerklm1998-09-05 22:12:23 +0000
commita214188729a6e391124da7cec122022dc820e773 (patch)
tree2f85fb94ad2c6d7a1fb0f695e144d9fa107d99c4 /Mailman/MailCommandHandler.py
parent1b3833849105ab31cb4f3eda069127de8743dc6c (diff)
downloadmailman-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.py10
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: