-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Malformed Content-Type header #102
Comments
I'm seeing this, as well. |
Interesting, thanks for reporting. It looks to me like the bug is that somehow HeaderFactory isn't returning a ParameterHeader for the Content-Type header, and that should be addressed rather than checking if the returned value is a ParameterHeader (the type should be a guarantee). I'm confused about what's causing that in your example. Do you mean it's exactly like you pasted it with the leading |
For me, the issue is occurring for a message that has a header called "contenttype". I recognize that the Here's a complete message that causes this issue:
|
Hi,
I confirm you that the issue is related to =“ chars, I tried with the same eml without =“ and it worked ad expected.
Inviato da iPhone
… Il giorno 2 gen 2020, alle ore 04:34, Zaahid Bateson ***@***.***> ha scritto:
Interesting, thanks for reporting.
It looks to me like the bug is that somehow HeaderFactory isn't returning a ParameterHeader for the Content-Type header, and that should be addressed rather than checking if the returned value is a ParameterHeader (the type should be a guarantee).
I'm confused about what's causing that in your example. Do you mean it's exactly like you pasted it with the leading =" or what's wrong with the header in your example that you think is causing this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks @travisaustin and @ivanghisleni -- both of those would be an issue but for slightly different reasons. Unfortunately @travisaustin -- yours is a little more complicated. The reason is, in trying to make something like what's happening with @ivanghisleni work, I ended up treating both a header with a name like "contenttype" to be equal to one with a name like "content-type", and the fix for that will be a little more complicated. I'll try get something out for both if possible, I'll need to investigate a bit more, but certainly the @ivanghisleni issue can be addressed more quickly. All the best. |
- Only use normalized header names when exact matches aren't available - Use normalized header naming both when determining the class to use for a header, and for finding headers
Fix for both released in 1.2.0 |
Great news,
thank you!!
…On Thu, Jan 9, 2020 at 5:59 AM Zaahid Bateson ***@***.***> wrote:
Fix for both released in 1.2.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#102?email_source=notifications&email_token=ABRMQMBIEWXXW6MCJPP7H6LQ42VLFA5CNFSM4KBTXG6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIO7A2Y#issuecomment-572387435>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRMQMC23T4SZPNGJR43C2LQ42VLFANCNFSM4KBTXG6A>
.
|
@zbateson - Thank you for the fast turnaround for this!! |
Hi,
We found some emails with malformed Content-Type header that generate crash:
Here the sample of portion of the EML that cause the issue:
="Content-Type: multipart/mixed;Boundary="USER_UNKNOWN"
The fix could be easy adding an extra check on contentType into getMimeBoundary():
Does it make sense to create a pull request for fixing it?
The text was updated successfully, but these errors were encountered: