Japanese language prevents user from unsubscribing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| GNU Mailman |
Medium
|
Mark Sapiro |
Bug Description
Hi,
When mailing list is configured with:
preferred_language = 'ja'
available_languages = ['en', 'ja']
send_goodbye_msg = 0
And mailman receives confirmation email for unsubscription with multipart message encoded in
different encoding than euc-jp, then mailmans command runner crashes with traceback:
Feb 10 18:08:00 2021 (1270) Uncaught runner exception: 'euc_jp' codec can't decode bytes in position 280-281: illegal multibyte sequence
Feb 10 18:08:00 2021 (1270) Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
keepqueued = self._dispose(
File "/usr/lib/
res.
File "/usr/lib/
results = MIMEText(
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
self._payload = charset.
File "/usr/lib64/
s = self.convert(s)
File "/usr/lib64/
return unicode(s, self.input_
UnicodeDecodeError: 'euc_jp' codec can't decode bytes in position 280-281: illegal multibyte sequence
Here is an example of a mail which triggers this:
Date: Wed, 11 Nov 2020 14:13:16 +0900
Subject: Re: ###CONFIRM###
From: <testuser2@
To: userlist-
MIME-Version: 1.0
Content-Type: multipart/
--0000000000006
Content-Type: text/plain; charset="UTF-8"
Content-
44GT44KT44Gr44G
--0000000000006
Also its maybe worth pointing out that setting RESPONSE_
I've managed to fix this issue by decoding the message part with its original charset and then encoding it to preferred encoding of mailing list.
I'm attaching my patch. Could you please consider merging it?
Thanks for any help you can provide.
Related branches
Tomas Korbar (tkorbar) wrote : | #1 |
Mark Sapiro (msapiro) wrote : | #2 |
Changed in mailman: | |
assignee: | nobody → Mark Sapiro (msapiro) |
importance: | Undecided → Medium |
milestone: | none → 2.1.35 |
status: | New → Fix Committed |
Mark Sapiro (msapiro) wrote : | #3 |
The current fix is attached. I initially committed the change without the 'errors=' arguments in the unicode and encode even though I knew better, and it only took 42 minutes after I installed it on mail.python.org to throw a UnicodeEncodeError on a confirmation on an English language list with non-ascii in the body.
Tomas Korbar (tkorbar) wrote : | #4 |
Ah, sorry about that.
Thanks for the new patch.
Thank you for the patch.