Staging
v0.5.1
https://github.com/python/cpython
Revision 5f977e09e8a29dbd5972ad79c4fd17a394d1857f authored by Miss Islington (bot) on 29 May 2020, 11:43:47 UTC, committed by GitHub on 29 May 2020, 11:43:47 UTC

* 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 21017ed904f734be9f195ae1274eb81426a9e776)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
1 parent f5bd99b
History
Tip revision: 5f977e09e8a29dbd5972ad79c4fd17a394d1857f authored by Miss Islington (bot) on 29 May 2020, 11:43:47 UTC
bpo-39040: Fix parsing of email mime headers with whitespace between encoded-words. (gh-17620)
Tip revision: 5f977e0
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.6 KB
.gitignore -rw-r--r-- 1.5 KB
.travis.yml -rw-r--r-- 6.1 KB
CODE_OF_CONDUCT.rst -rw-r--r-- 631 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 62.9 KB
README.rst -rw-r--r-- 9.6 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 492.1 KB
configure.ac -rw-r--r-- 164.8 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 42.3 KB
setup.py -rw-r--r-- 101.3 KB

README.rst

back to top