-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
message/rfc822 attachment with blank Content-Transfer-Encoding header causes attachment to become corrupted when loaded and prepared by mimekit #1049
Comments
My gut instinct is that this is where things are going wrong: https://github.com/jstedfast/MimeKit/blob/master/MimeKit/ParserOptions.cs#L358-L383 Technically, what is likely going wrong is the but the first link I pasted contains the "justification" for said logic and why it's being used at all. 2 possible fixes that might work:
|
Should theoretically fix issue #1049
I'll want to add unit tests for this (for both MimeParser and ExperimentalMimeParser) before I call this "complete", but in the meantime, I figured I'd push those potential fixes and you'll be able to test the nuget package (that will get pushed to myget.org) when the CI/CD pipeline finishes pushing out a new build/package. |
FWIW, I'm also planning to push a new release probably this weekend or maybe before then if I get the free time. |
Brilliant, thanks for your help really appreciate the quick response. |
Just added some unit tests and it seems like it works with my fixes. |
Describe the bug
A clear and concise description of what the bug is.
Platform (please complete the following information):
To Reproduce
With demo.eml set to copy to output directory.
Content-Type: multipart/alternative; boundary=3D"=3D-opcn9iLL5vM98wIjSIhg+Q=
=3D=3D"
--=3D-opcn9iLL5vM98wIjSIhg+Q=3D=3D
......."
Expected behaviour
The attachment should not be corrupted when loaded, prepared and saved by mimekit.
Additional context
This seems to only occur when time message/rfc822 header has a
Content-Transfer-Encoding:
header, this does not happen with eitherContent-Transfer-Encoding: quoted-printable
or a no Content-Transfer-Encoding at all.The text was updated successfully, but these errors were encountered: