[Bug 897103] [NEW] Crash when moderating messages with empty sender address

Public bug reported:
A message in the moderation queue has had an empty sender address ("From: foobar <>").
This leads to the folowing traceback: admin(9230): [----- Mailman Version: 2.1.14 -----] admin(9230): [----- Traceback ------] admin(9230): Traceback (most recent call last): admin(9230): File "/home/.internal/mailman/scripts/driver", line 112, in run_main admin(9230): main() admin(9230): File "/home/.internal/mailman/Mailman/Cgi/admindb.py", line 167, in main admin(9230): process_form(mlist, doc, cgidata) admin(9230): File "/home/.internal/mailman/Mailman/Cgi/admindb.py", line 718, in process_form admin(9230): if id not in senderactions[sender]['message_ids']: admin(9230): KeyError: 'message_ids'
** Affects: mailman Importance: Undecided Status: New

I have fixed this by preventing the underlying cause from happening. If a message is held for which Mailman's Message.get_sender() method returns an empty string, the sender in the request.pck file will be recorded as '<missing>'. This will prevent the problem in the future, but it won't fix the crash if there is an existing held message entry in request.pck with a null sender. The crash can be avoided by going to the message detail page for the held message by following the number link next to the Subject: in the overview page and discarding the message from the detail page.
Interestingly, for this issue to have occurred in the first place, in addition to the From: header having a null address, the same must have been true of a Sender: header if any and the envelope sender.
** Changed in: mailman Importance: Undecided => Low
** Changed in: mailman Status: New => Fix Committed
** Changed in: mailman Milestone: None => 2.1.15
** Changed in: mailman Assignee: (unassigned) => Mark Sapiro (msapiro)

** Changed in: mailman Status: Fix Committed => Fix Released
participants (2)
-
Bernd Wurst
-
Mark Sapiro