The logger can throw UnicodeEncodeError if the log message is unicode

Bug #1047100 reported by Mark Sapiro
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Mark Sapiro

Bug Description

There is code in Mailman's _Syslog.write_ex() method to catch a UnicodeError when writing the log file and quoted-printable encode the log message. This works on messages that contain non-ascii, 8-bit bytes, but if the message is a unicode with non-ascii characters, the attempt to quoted-printable encode it will throw UnicodeEncodeError which is not caught.

Fix this by first encoding the unicode message as utf-8 and then quoted-printable encoding that.

Mark Sapiro (msapiro)
Changed in mailman:
status: In Progress → Fix Committed
Mark Sapiro (msapiro)
Changed in mailman:
milestone: 2.1.16 → 2.1.16rc1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers