Skip to content
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

RFC2047-encoded headers with spaces look bad #424

Closed
yzzyx opened this issue Apr 24, 2015 · 6 comments
Closed

RFC2047-encoded headers with spaces look bad #424

yzzyx opened this issue Apr 24, 2015 · 6 comments
Milestone

Comments

@yzzyx
Copy link
Contributor

yzzyx commented Apr 24, 2015

NOTE!
RFC2047 specifically says that it's forbidden to include spaces in encoded headers,
but there seems to be all too many broken MUA's out there.

Example:
Subject: =?ISO-8859-1?Q?PUNKDISTRO mailorder news 24.04.2015 / PISSE LP pr?=
=?ISO-8859-1?Q?e-order?=

In this example, the first part will not get decoded, only the second part, because of the included spaces. Other mua's (i.e. thunderbird) gracefully handle this and assumes (correctly) that the spaces should have been encoded.

(There's also a second issue here, with multi-line subjects, that means that this will be displayed as
=?ISO-8859-1?Q?PUNKDISTRO mailorder news 24.04.2015 / PISSE LP pr?= e-order - with a space between the two parts, when there should have been no space, but that's another issue)

So - should I create a pull request for this? It's annoying, so I'll at least patch my own fork, but I think others would benefit from it as well, even though it doesn't follow the RFC.

@gauteh
Copy link
Member

gauteh commented Apr 25, 2015

I think this could be included, anyway, it would be great with
test-cases that illustrate and test the problem.

I'd preferably like to have this in RMail, do you know if the Mail gem
handles this case correctly?

Excerpts from Elias Norberg's message of April 24, 2015 18:09:

NOTE!
RFC2047 specifically says that it's forbidden to include spaces in encoded headers,
but there seems to be all too many broken MUA's out there.

Example:
Subject: =?ISO-8859-1?Q?PUNKDISTRO mailorder news 24.04.2015 / PISSE LP pr?=
=?ISO-8859-1?Q?e-order?=

In this example, the first part will not get decoded, only the second part, because of the included spaces. Other mua's (i.e. thunderbird) gracefully handle this and assumes (correctly) that the spaces should have been encoded.

(There's also a second issue here, with multi-line subjects, that means that this will be displayed as
=?ISO-8859-1?Q?PUNKDISTRO mailorder news 24.04.2015 / PISSE LP pr?= e-order - with a space between the two parts, when there should have been no space, but that's another issue)

So - should I create a pull request for this? It's annoying, so I'll at least patch my own fork, but I think others would benefit from it as well, even though it doesn't follow the RFC.


Reply to this email directly or view it on GitHub:
#424

@yzzyx
Copy link
Contributor Author

yzzyx commented Apr 26, 2015

RMail doesn't seem to have any RFC2047-code (which I guess is the reason there's a rfc2047.rb in sup). The "mail"-gem handles it correctly (tested with version 2.6.3).

I'll write a test-case and patch and make a pull request.

@gauteh
Copy link
Member

gauteh commented Apr 26, 2015

Ok, thanks

@yzzyx
Copy link
Contributor Author

yzzyx commented Apr 26, 2015

Is the 'use-mail'-branch going to be merged (any time soon)?
Because it works fine there (since 'mail' is taking care of it).
I'll still patch the develop-tree, and add a test-case for regressions, but that's good news anyhow.

@gauteh
Copy link
Member

gauteh commented Apr 26, 2015

It needs work, but @ZJvandeWeg is working on it (e.g. #426), check out #127 for status.

@gauteh
Copy link
Member

gauteh commented Jun 16, 2015

ref #427.

@danc86 danc86 added this to the 0.23 milestone Jun 14, 2020
@danc86 danc86 modified the milestones: 0.23, 0.24 Jul 9, 2020
danc86 added a commit to danc86/sup that referenced this issue Jul 19, 2020
The RFC says spaces must not appear in encoded words but we can accept
and decode them.

Fixes sup-heliotrope#424.
@danc86 danc86 closed this as completed in 04b6fa5 Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants