jstedfast / gmime

A C/C++ MIME creation and parser library with support for S/MIME, PGP, and Unix mbox spools.
GNU Lesser General Public License v2.1
111 stars 36 forks source link

Special file name format parsing error #123

Closed sydkhfl closed 2 years ago

sydkhfl commented 2 years ago

The name is written in two lines like the following, but only one line is parsed: Content-Type: content/unknown; name0="=?UTF-8?B?dGVzdHRlc3Rlc3R0dGVzdHR0ZXN0dHRlc3R0dG"; name1="VzdHR0ZXN0dHRlc3R0dC54bHN4=?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename0="=?UTF-8?B?dGVzdHRlc3Rlc3R0dGVzdHR0ZXN0dHRlc3R0dG"; filename1="VzdHR0ZXN0dHRlc3R0dC54bHN4?="

The attachment is an eml that is parsed incorrectly testEml.zip

jstedfast commented 2 years ago

That's not a valid way of generating the Content-Type or Content-Disposition headers.

Apparently, the authors of that mail client just decided to do their own thing and not follow any of the specs.