Attachments with ' just hang

Bug #266332 reported by Xprt5-users
2
Affects Status Importance Assigned to Milestone
GNU Mailman
New
Medium
Unassigned

Bug Description

If someone sends an email with the character '
in the subject or attachment name mailman hangs.

after deleting the ' in the attachment name in
/usr/local/cpanel/3rdparty/mailman/lists/list_name/digest.mbox
the next message is delivered (but this message isn't
delivered!)

Apr 11 23:04:22 2006 (60899) Uncaught runner exception:
need more than 2 values to unpack

This was working fine before a recent upgrade with
mailman/python and still works fine on other servers.

[http://sourceforge.net/tracker/index.php?func=detail&aid=1469962&group_id=103&atid=100103]

Revision history for this message
Mark Sapiro (msapiro) wrote :

What Mailman/Python version is this?

Also see
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq06.011.htp

Revision history for this message
Xprt5-users (xprt5-users) wrote :

Mailman version is 2.1.6

Revision history for this message
Mark Sapiro (msapiro) wrote :

I'm not sure if this is a 2.1.6 bug or a cPanel bug, but it
seems to be fine in 2.1.7 since I have now received copies
of this bug report, its two updates, the 149967 report and
its update (a total of 5 messages) from the
<email address hidden> Mailman 2.1.7 list, and they all
have subject

[ mailman-Bugs-1469962 ] Attachments with ' just hang

(or the same with 1469967). I.e., the same messages you
receive directly from sourceforge.net are also posted to
<email address hidden>.

In any case, if you want to post the full traceback from the
error, either here or directly to me, I will try to
determine the problem and suggest a fix for 2.1.6.

Revision history for this message
Xprt5-users (xprt5-users) wrote :

Here is the latest traceback

Apr 11 23:04:22 2006 (60899) Uncaught runner exception: need
more than 2 values to unpack
Apr 11 23:04:22 2006 (60899) Traceback (most recent call last):
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/Runner.py",
line 111, in _oneloop
    self._onefile(msg, msgdata)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/Runner.py",
line 167, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/IncomingRunner.py",
line 130, in _dispose
    more = self._dopipeline(mlist, msg, msgdata, pipeline)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Queue/IncomingRunner.py",
line 153, in _dopipeline
    sys.modules[modname].process(mlist, msg, msgdata)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/ToDigest.py",
line 92, in process
    send_digests(mlist, mboxfp)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/ToDigest.py",
line 133, in send_digests
    send_i18n_digests(mlist, mboxfp)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/ToDigest.py",
line 315, in send_i18n_digests
    msg = scrubber(mlist, msg)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/Scrubber.py",
line 299, in process
    url = save_attachment(mlist, part, dir)
  File
"/usr/local/cpanel/3rdparty/mailman/Mailman/Handlers/Scrubber.py",
line 411, in save_attachment
    filename = Utils.oneline(msg.get_filename(''), lcset)
  File
"/usr/local/cpanel/3rdparty/mailman/pythonlib/email/Message.py",
line 724, in get_filename
    filename = self.get_param('filename', missing,
'content-disposition')
  File
"/usr/local/cpanel/3rdparty/mailman/pythonlib/email/Message.py",
line 607, in get_param
    for k, v in self._get_params_preserve(failobj, header):
  File
"/usr/local/cpanel/3rdparty/mailman/pythonlib/email/Message.py",
line 554, in _get_params_preserve
    params = Utils.decode_params(params)
  File
"/usr/local/cpanel/3rdparty/mailman/pythonlib/email/Utils.py",
line 337, in decode_params
    charset, language, value =
decode_rfc2231(EMPTYSTRING.join(value))
  File
"/usr/local/cpanel/3rdparty/mailman/pythonlib/email/Utils.py",
line 284, in decode_rfc2231
    charset, language, s = parts
ValueError: need more than 2 values to unpack

Apr 11 23:04:22 2006 (60899) SHUNTING:
1144789462.1552839+7ff91a627d48daa19efc8509d86eb3ec869fc909

Revision history for this message
Mark Sapiro (msapiro) wrote :

I am unable to duplicate this error with various versions of
Python's email library. I am using an attachment with the header

Content-Disposition: attachment;
 filename="cal'dar.doc"

If the one that fails in your case is different from this in
any significant way, please post it.

Revision history for this message
Mark Sapiro (msapiro) wrote :

The thing I missed in trying to duplicate is the fact that
the exception is thrown in decode_rfc2231(). Thus, the
problem only occurs with a RFC2231 encoded header, i.e., one
with a long filename split into pieces as
   filename*0="first part of name containing ' character"
   filename*1="second part of name - etc."

The underlying problem is in the Python email library in
email/Utils.py.

See
http://mail.python.org/pipermail/email-sig/2006-July/000293.html
for a more complete description and a potential fix.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.