On 5/13/20 4:48 AM, Sebastian Hagedorn wrote:
> Hi,
> 
> we seem to have new entries in the error log. I believe they have only 
> started to appear with the recent updates, but I cannot swear to that:
> 
> admin(7095): [----- Mailman Version: 2.1.33 -----]
> admin(7095): [----- Traceback ------]
> admin(7095): Traceback (most recent call last):
> admin(7095):   File "/usr/lib/mailman/scripts/driver", line 117, in run_main
> admin(7095):     main()
> admin(7095):   File "/usr/lib/mailman/Mailman/Cgi/subscribe.py", line 113, in 
> main
> admin(7095):     process_form(mlist, doc, cgidata, language)
> admin(7095):   File "/usr/lib/mailman/Mailman/Cgi/subscribe.py", line 258, in 
> process_form
> admin(7095):     mlist.AddMember(userdesc, remote)
> admin(7095):   File "/usr/lib/mailman/Mailman/MailList.py", line 941, in 
> AddMember
> admin(7095):     if self.CheckPending(email):
> admin(7095):   File "/usr/lib/mailman/Mailman/MailList.py", line 849, in 
> CheckPending
> admin(7095):     op, data = v
> admin(7095): ValueError: too many values to unpack
> 
> I have no idea what causes that, and I have not been able to reproduce it. It 
> only seems to happen with a minority of subscribe attempts.

This comes from the new in 2.1.30 feature:

There is a new REFUSE_SECOND_PENDING mm_cfg.py setting that will cause a
second request to subscribe to a list when there is already a pending
confirmation for that user.  This can be set to Yes to prevent
mailbombing of a third party by repeatedly posting the subscribe form.
(LP: #1859104)

There is a bug in the code in that it assumes every entry in the
pending.pck data is a 2-tuple which isn't correct. You can avoid this by
not setting REFUSE_SECOND_PENDING = Yes in mm_cfg.py, or this patch will
fix it

=== modified file 'Mailman/MailList.py'
--- Mailman/MailList.py 2020-01-10 01:00:40 +0000
+++ Mailman/MailList.py 2020-05-13 17:32:00 +0000
@@ -846,9 +846,8 @@
         for k, v in pends.items():
             if k in ('evictions', 'version'):
                 continue
-            op, data = v
-            if (op == Pending.SUBSCRIPTION and
-                    data.address.lower() == email.lower()):
+            if (v[0] == Pending.SUBSCRIPTION and
+                    v[1].address.lower() == email.lower()):
                 return True
         return False



-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
    https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to