Skip to content
Snippets Groups Projects
Commit 1ca7f708 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix decoding of tab-indented 'charset' of multi-part MIME text parts

Apple Mail apparently uses tabs to indent the charset of nested MIME parts:

e.g.
--Apple-Mail-143B9F0C-6BB4-4C8E-869B-6DE05D6B58CE
Content-Type: text/plain;
<tab>charset=utf-8
Content-Transfer-Encoding: quoted-printable

This fixes issue #483 reported by Nelgin
parent 0bb2bbfd
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4022 passed
......@@ -375,7 +375,10 @@ void smb_parse_content_type(const char* content_type, char** subtype, char** cha
}
}
char* parms = p;
if(charset != NULL && ((p = strcasestr(parms, " charset=")) != NULL || (p = strcasestr(parms, ";charset=")) != NULL)) {
if(charset != NULL &&
((p = strcasestr(parms, " charset=")) != NULL
|| (p = strcasestr(parms, ";charset=")) != NULL
|| (p = strcasestr(parms, "\tcharset=")) != NULL)) {
BOOL quoted = FALSE;
p += 9;
if(*p == '"') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment