-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
RFC2231-style MIME part header continuations erroneously used for long Content-ID fields #4327
Comments
Thanks for the detailed bug report - I think I can fix it :) |
Amazing, @gahr! Thanks! Let me know if you want me to test… |
I see that support for @dcpurton can you please comment on the design choice? Would putting |
@madduck could you please give the branch devel/issue-4327 a try? |
That's a great question… Most likely a misunderstanding around use case of parameters. I vaguely remember at the time wishing there was a field in You should definitely replace with a dedicated field in |
Assuming I did everything right, this unfortunately does not fix the problem:
|
I fear you did not: you are running 194907, which is the last commit on the main branch. |
I can confirm that the content ID is no longer a parameter of content-type:
However, it should now be line-wrapped, see above. |
Certainly need to refresh my Git foo lol. Sorry. |
Uhm.. are you suggesting that we should RFC2047-encode all long header field bodies so we can break them up? Interesting.. I don't think we do that, even for the subject - try composing a message with a very long subject without spaces, and you'll see that we don't RFC2047-encode + split it. Perhaps we should discuss this on a separate issue? Edit: I have double checked what Apple Mail and Roundcube do, and neither encode long subjects with RFC2047 for the purpose of splitting them. |
I cannot find a source saying that the headers should be encoded. Python's default email policy causes header lines to be encoded and folded to <=78 characters. But it doesn't seem like it's required to do this. |
On NeoMutt 20240425 (Debian unstable), so relatively recent, I just encountered the following corner-case bug:
When composing a MIME message and the Content-ID of a MIME part I enter exceeds a certain length, NeoMutt splits the Content ID across multiple lines, according to RFC2231, but RFC2231 only applies to parameters, not fields.
This is what a normal MIME part header with Content-ID looks like:
If the Content-ID value exceeds a certain length, it gets broken across lines:
Note how the angle brackets are preserved in the encoding (
=3C
and=3E
).When I assign such a long content ID to a part using NeoMutt, however, it seems to think it needs to invoke RFC2231, and makes the Content-ID field a parameter of Content-Type, which is wrong:
In doing so, it also loses the angle brackets, but that doesn't really matter anymore, as the MIME part is now misformed.
The text was updated successfully, but these errors were encountered: