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
mime/multipart: two boundaries can't have the same prefix #10616
Comments
Do you have the complete input file, or a minimal repro? What generated it? Is this a multipart document embedded in a multipart part? I can imagine what the bug might be, but I'd still like to have a repro case. It would save me time trying to generate it. |
MIME-Version: 1.0 ------=_NextPart_4c2fbafd7ec4c8bf08034fe724b608d9 ------=_NextPart_4c2fbafd7ec4c8bf08034fe724b608d9_alt This is a multi-part message in MIME format. ------=_NextPart_4c2fbafd7ec4c8bf08034fe724b608d9_alt html things |
Thanks. |
This fix works for me: At the line 36, |
Too late for Go 1.5. |
@rsc, I have a fix for this at https://go-review.googlesource.com/11811 and it'd still be nice to get into Go 1.5 since this isn't some hypothetically fuzzer case, but generated by a real client library, and this is our fault. |
CL https://golang.org/cl/11811 mentions this issue. |
Hello,
I encounter difficulties to parse a MIME file, due to 2 boundaries:.
Content-Type: multipart/related; boundary="----=_NextPart_eedf1356402a50765728c12998413837"
Content-Type: multipart/alternative; boundary="----=_NextPart_eedf1356402a50765728c12998413837_alt"
It throws the error: "unexpected EOF"
And finally, after several test, I have found that it's because the first is the prefix of the second and mime/multipart package which looking for boundaries with bytes.Index(...) (multipart.go l.174).
The text was updated successfully, but these errors were encountered: