mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 06:39:46 +08:00
e9bb9a167b
The mail class seems to handle mails sent with Content-Transfer-Encoding: 8bit somewhat weirdly: It decodes them (to utf-8), changes the raw source to base64, and does not modify the Content-Type:charset= header. This leads to Discourse trying the message encoding (in my example ISO-8859-1) first, and if that does not contain any unparseable characters, it uses that. Sadly, in ISO-8859-1, every byte sequence is valid. Fix this by always trying to decode as UTF-8 first. The probability of someone using another encoding that cleanly (but wrongly) decodes as UTF-8 should be fairly low.
13 lines
362 B
Plaintext
13 lines
362 B
Plaintext
Return-Path: <discourse@bar.com>
|
|
From: Foo Bar <discourse@bar.com>
|
|
To: reply+4f97315cc828096c9cb34c6f1a0d6fe8@bar.com
|
|
Date: Fri, 15 Jan 2016 00:12:43 +0100
|
|
Message-ID: <43@foo.bar.mail>
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=iso-8859-1
|
|
Content-Disposition: inline
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
hab vergessen kritische zeichen einzufügen:
|
|
äöüÄÖÜß
|