Private xmlrpc server OOPSes when receiving an unicode string as email message

Bug #294353 reported by Ursula Junque
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Edwin Grubbs

Bug Description

As seen on OOPS-1039XMLP1:

TypeError: email_message must be a normal string. Got: u'Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org)\\n\\tby forster.canonical.com with esmtp (Exim 4.69 #1 (Debian))\\n\\tid 1KxL55-0005Gc-IG for <email address hidden>;\\n\\tTue, 04 Nov 2008 12:32:24 +0000\\nReceived: from list by ciao.gmane.org with local (Exim 4.43)\\n\\tid 1KxL4z-0007mh-Ew\\n\\tfor <email address hidden>; Tue, 04 Nov 2008 12:32:17 +0000\\nReceived: from faui44a.informatik.uni-erlangen.de ([131.188.34.129])\\n\\tby main.gmane.org with esmtp (Gmexim 0.1 (Debian))\\n\\tid 1AlnuQ-0007hv-00 for <email address hidden>;\\n\\tTue, 04 Nov 2008 12:32:17 +0000\\nReceived: from siretart by faui44a.informatik.uni-erlangen.de with local\\n\\t(Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00\\n\\tfor <email address hidden>;\\n\\tTue, 04 Nov 2008 12:32:17 +0000\\nX-Injected-Via-Gmane: http://gmane.org/\\nTo: <email address hidden>\\nFrom: Reinhard Tartler <email address hidden>\\nSubject: Re: lists.canonical.com VS lists.launchpad.net\\nDate: Tue, 04 Nov 2008 13:32:06 +0100\\nLines: 10\\nMessage-ID: <email address hidden>\\nReferences: <email address hidden>\\nMime-Version: 1.0\\nContent-Type: text/plain; charset=utf-8\\nContent-Transfer-Encoding: 8bit\\nX-Complaints-To: <email address hidden>\\nX-Gmane-NNTP-Posting-Host: faui44a.informatik.uni-erlangen.de\\nX-Url: https://launchpad.net/~siretart\\nUser-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)\\nCancel-Lock: sha1:l1poNe5l325xFAd1hKcgG9o9WgQ=\\nSender: news <email address hidden>\\n\\n"(``-_-\\xb4\\xb4) -- Fernando" <email address hidden> writes:\\n\\n> Werent we supposed to be using lists.launchpad.net?\\n> I see most (if not all) emails still coming from lists.canonical.com.\\n\\nAnd will the gmane group continue to work after the switch?\\n\\n-- \\nGruesse/greetings,\\nReinhard Tartler, KeyID 945348A4\\n\\n\\n'

More: OOPS-1104XMLP1, OOPS-1124XMLP3, OOPS-1124XMLP4

Ursula Junque (ursinha)
Changed in launchpad-registry:
assignee: nobody → barry
Revision history for this message
Barry Warsaw (barry) wrote :

I'm just guessing here, but it looks like this message came from gmane and does not have properly encoded Sender header (looks like there are non-ascii bytes in Fernando's name). I didn't think xmlrpclib supported unicode, but maybe there's magic I'm not aware of.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: barry → nobody
importance: Undecided → Low
status: New → Triaged
Ursula Junque (ursinha)
description: updated
Ursula Junque (ursinha)
description: updated
tags: added: mailing-lists
Revision history for this message
Curtis Hovey (sinzui) wrote :

The most modern form of this oops:

zope.app.publisher.xmlrpc.metaconfigure.MailingListAPIView instance at 0xada9710>
  Module zope.publisher.publish, line 115, in debug_call
    return obj(*args)
  Module canonical.launchpad.xmlrpc.mailinglist, line 254, in holdMessage
    message = getUtility(IMessageSet).fromEmail(bytes)
  Module canonical.launchpad.database.message, line 330, in fromEmail
    subject = self._decode_header(parsed_message.get('subject', ''))
  Module canonical.launchpad.database.message, line 258, in _decode_header
    (bytes.decode(charset, 'replace').encode('utf-8'), 'utf-8'))
LookupError: unknown encoding: windows-874

Mailman sent a message to a lists moderation queue, but it never arrived:
In the case of holdMessage(), mailman has already determined the message is a problem and is placing a copy of it in a queue for a person to approve or discard. We might be able to force the encoding to ascii, dropping unknown characters.

Changed in launchpad-registry:
importance: Low → High
milestone: none → series-future
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: series-future → none
assignee: nobody → Edwin Grubbs (edwin-grubbs)
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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