[Bug 1462755] Re: qrunner crashes on invalid unicode sequence

Mark Sapiro mark at msapiro.net
Mon Jun 8 02:08:17 CEST 2015


It appears the underlying issue is someone has changed Mailman's
character set for 'nl' (Dutch) from iso-8859-1 to utf-8. Possibly
whoever did this did the appropriate things such as recoding the message
catalog and templates to utf-8, but in any case, the strings in the
attributes of this list weren't recoded. This is one of the major
problems that make it difficult to change Mailman's encoding for a
language. See the definitions of the recode(), doitem() and convert()
functions in Mailman/versions.py in Mailman 2.1.19 or later.

So basically, this issue appears to be a 'shot oneself in the foot'
thing and probably could be fixed by setting the list's description to
'Lijst voor Caljent\xc3\xa9-leden', although I would be concerned that
there are other iso-8859-1 strings in list attributes.

Anyway, I see this as an issue worth fixing. The fix I would propose is
in Mailman/Handlers/CookHeaders.py replace the line at the end of the
definition of uheader which is currently

    return Header(s, charset, maxlinelen, header_name, continuation_ws)

with

    try:
        return Header(s, charset, maxlinelen, header_name, continuation_ws)
    except UnicodeError:
        syslog('error', 'list: %s: can\'t decode "%s" as %s', mlist.internal_name(), s, charset)
        return Header('', charset, maxlinelen, header_name, continuation_ws)


** Changed in: mailman
   Importance: Medium => Low

** Changed in: mailman
       Status: Incomplete => In Progress

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1462755

Title:
  qrunner crashes on invalid unicode sequence

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1462755/+subscriptions


More information about the Mailman-coders mailing list