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

Length of encoded-words #57

Open
toonn opened this issue May 26, 2019 · 1 comment
Open

Length of encoded-words #57

toonn opened this issue May 26, 2019 · 1 comment
Labels
PR welcome Feature request is accepted and waiting for realization.

Comments

@toonn
Copy link

toonn commented May 26, 2019

It seems like the implementation doesn't respect the character limit on encoded-words specified in RFC-2047.
The following example string is 139 characters:

"This \"encoded-word\" is longer than 75 characters which is not allowed according to RFC-2047 (https://tools.ietf.org/html/rfc2047#section-2)"

It results in the following encoded-word representation:

=?utf-8?Q?This_=22encoded-word=22_is_longer_than_75_characters_which_is_not_allowed_according_to_RFC-2047_=28https=3A//tools=2Eietf=2Eorg/html/rfc2047#section-2=29?=

As I read it the RFC requires the following (I included a field identifier because I believe it's included in the count):

To: =?utf-8?Q?This_=22encoded-word=22_is_longer_than_75_characters_which_?=
 =?utf-8?Q?is_not_allowed_according_to_RFC-2047_=28https=3A//tools=2Eietf?=
 =?utf-8?Q?=2Eorg/html/rfc2047#section-2=29?=
@kindaro
Copy link
Collaborator

kindaro commented Sep 7, 2020

@toonn  So, according to the standard, the encoded header should be split into multiple lines each up to 75 bytes, and mime-mail does not do that. Do I understand you right?

If this causes problems for you and you are willing to put in the work, I shall merge a patch that exposes (say, via a quick check property) and fixes this issue, for a total of 2 commits. Unfortunately it is unlikely that I shall be able to find time to do it myself, and probably the same can be said about other maintainers.

@kindaro kindaro added the PR welcome Feature request is accepted and waiting for realization. label Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR welcome Feature request is accepted and waiting for realization.
Projects
None yet
Development

No branches or pull requests

2 participants