[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
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

[3.8] bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620) #20505

Merged
merged 1 commit into from May 29, 2020

Conversation

Copy link
Contributor

miss-islington commented May 29, 2020

  • bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string.

It is fairly common to find malformed mime headers (especially content-disposition
headers) where the parameter values, instead of being encoded to RFC
standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and
then enclosing the whole thing in quotes. The processing of these malformed
headers was incorrectly leaving the spaces between encoded words in the decoded
text (whitespace between adjacent encoded words is supposed to be stripped on
decoding). This changeset fixes the encoded word processing inside quoted strings
(bare-quoted-string) to do correct RFC 2047 decoding by stripping that
whitespace.
(cherry picked from commit 21017ed)

Co-authored-by: Abhilash Raj maxking@users.noreply.github.com

https://bugs.python.org/issue39040

…encoded-words. (pythongh-17620)

* bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string.

It is fairly common to find malformed mime headers (especially content-disposition
headers) where the parameter values, instead of being encoded to RFC
standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and
then enclosing the whole thing in quotes.  The processing of these malformed
headers was incorrectly leaving the spaces between encoded words in the decoded
text (whitespace between adjacent encoded words is supposed to be stripped on
decoding).  This changeset fixes the encoded word processing inside quoted strings
(bare-quoted-string) to do correct RFC 2047 decoding by stripping that
whitespace.
(cherry picked from commit 21017ed)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
Copy link
Contributor Author

miss-islington commented May 29, 2020

@maxking and @bitdancer: Status check is done, and it's a success .

2 similar comments
Copy link
Contributor Author

miss-islington commented May 29, 2020

@maxking and @bitdancer: Status check is done, and it's a success .

Copy link
Contributor Author

miss-islington commented May 29, 2020

@maxking and @bitdancer: Status check is done, and it's a success .

miss-islington merged commit 6381ee0 into python:3.8 May 29, 2020
5 checks passed
miss-islington deleted the backport-21017ed-3.8 branch May 29, 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

Successfully merging this pull request may close these issues.

None yet

5 participants