From 66dc59ab5f368b1373f34d6487d7b43ad3af6941 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 25 Jun 2010 15:39:24 -0700 Subject: Fixed an issue in admindb that could result in a KeyError and "we hit a bug" response when a moderator acts on a post that had been handled by someone else after the first moderator had retrieved it. Bug #598671. --- Mailman/Cgi/admindb.py | 16 ++++++++++------ NEWS | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index f7654dc2..586b406d 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -780,12 +780,16 @@ def process_form(mlist, doc, cgidata): forwardaddrkey = 'forward-addr-%d' % request_id bankey = 'ban-%d' % request_id # Defaults - if mlist.GetRecordType(request_id) == HELDMSG: - msgdata = mlist.GetRecord(request_id)[5] - comment = msgdata.get('rejection_notice', - _('[No explanation given]')) - else: - comment = _('[No explanation given]') + try: + if mlist.GetRecordType(request_id) == HELDMSG: + msgdata = mlist.GetRecord(request_id)[5] + comment = msgdata.get('rejection_notice', + _('[No explanation given]')) + else: + comment = _('[No explanation given]') + except KeyError: + # Someone else must have handled this one after we got the page. + continue preserve = 0 forward = 0 forwardaddr = '' diff --git a/NEWS b/NEWS index 453413ec..bc011d5b 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,10 @@ Here is a history of user visible changes to Mailman. Bug Fixes and other patches + - Fixed an issue in admindb that could result in a KeyError and "we hit a + bug" response when a moderator acts on a post that had been handled by + someone else after the first moderator had retrieved it. Bug #598671. + - Fixed a bug which would fail to show a list on the admin and listinfo overview pages if its web_page_url contained a :port. Bug # 597741. -- cgit v1.2.3