On Fri, Jul 09, 2004 at 09:48:24AM +0200, Tom G. Christensen wrote:
I just hit a bug in 2.1.5 in the 'Confirm subscription request' page.
If you press 'Cancel my subscription request' you just get a crash like the one below.
Thanks for the report. The subscription_cancel method fails to lock the list before acting on the pending database (the same lock guards both the list configuration and the pending pck). A quick fix would be to wrap it (in Mailman/Cgi/confirm.py): --- confirm.py-2.1.5 2004-02-11 07:50:10.000000000 +0900 +++ confirm.py 2004-07-09 21:48:32.753528352 +0900 @@ -308,8 +308,12 @@ def subscription_cancel(mlist, doc, cookie): - # Discard this cookie - userdesc = mlist.pend_confirm(cookie)[1] + mlist.Lock() + try: + # Discard this cookie + userdesc = mlist.pend_confirm(cookie)[1] + finally: + mlist.Unlock() lang = userdesc.language i18n.set_language(lang) doc.set_language(lang) However in looking at this, I noticed the other _cancel methods fail to use the user's preferred language when reporting their cancel results. If my preferred language is Japanese and I submit an address change, and then cancel that change... the resulting page is in English. So a more complete patch to confirm.py really needs to be developed that addresses both problems. -- Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 Python Starship http://Starship.Python.net/ Ringo MUG Tokyo http://www.ringo.net/rss.html